General C++ Programming - March 2020 (Page 4)

without windows functions, can i get the key state?
 
i'm using a loop for get a pressed key: #include <graphics.h> #include <conio.h> #include <stdio.h>...
[4 replies] Last: this looks like gaming stuff. gaming stuff may prefer to use directin... (by jonnin)
Classes
 
I have this assignment but I am not sure how to do it. voidStringC::operator*=(constinti) { ...
[2 replies] Last: > the string should be duplicated “i”times ¿so "a" * 3 will giv... (by ne555)
Searching thru files
 
Hi, Would you please help me... I have below code and it only search the first line.. I think I a...
[5 replies] Last: Well searching through Temp.txt is going to be a right royal PITA beca... (by salem c)
by glixy
lab assignment help (functions & arrays)
 
I need some help with this C++ assignment. Any help would be appreciated, thank you! Assignment: ...
[1 reply] : [quote=glixy]This is what I have so far. Nah. You took it from here,... (by lastchance)
how to create a multi vulnerable code with info leaks in windows 10?
 
I am trying to create a poc in order to achieve the following vulnerabilty bug class in my code for ...
[2 replies] Last: Cross-posted: https://stackoverflow.com/questions/60717376/how-to-crea... (by deleted account xyzzy)
How do I copy the structure which has both string and integer into a char array in C++?
 
I want to generate hash of struct prop so for i need to copy the structure into a byte array and pas...
[9 replies] Last: oh, he said char array in the title but used string; mine won't work w... (by jonnin)
Why isn't this string comparison working?
 
So let's say that you are getting user input with getline() string userInput; getline(cin, us...
[13 replies] Last: Make a completely new project, then paste in the code in jlb's post. C... (by Ganado)
Unwritten article about checking the Small Device C Compiler
 
SDCC is a retargettable, optimizing standard C (ANSI C89 / ISO C90, ISO C99, ISO C11 / C17) compiler...
[no replies]
by doggi
undefined reference to `jsonxx::Object::Object()'
 
I have to use jsonxx library in my project. But calling this line jsonxx::Object out; throws an erro...
[15 replies] Last: I figured out that had to use cmake. It worked! Thank you everyone! (by doggi)
How to access elements of a const char*
 
I have this code: void GetLetter(const char* inputString) { cout << "The 1st letter is "...
[2 replies] Last: #include <iostream> char GetLetterByIndex(const char *inputString, ... (by fewdiefie)
Converting file handling to linked list
 
Hi Sir, I am new here. I need your help in converting below to linked list. Would you know how to...
[5 replies] Last: struct Node { int data; // for example Node *pNext;... (by fewdiefie)
Why doesn't a static cast work here?
 
Let's say that you are trying to check which object is which. #include <iostream> using names...
[2 replies] Last: static_cast<new_type>(expression) 2) If new_type is a pointer or re... (by fewdiefie)
by zongul
You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64
 
I want to migrate from 32 bit to 64 bit and get the error from the title. I am working on visual stu...
[2 replies] Last: The error is saying that _USE_32BIT_TIME_T is defined (but why?) somew... (by dutch)
Using multiple cores
 
I'm just looking for some quality information about writing code that uses multiple cores. I'm not s...
[9 replies] Last: @dhayden's point is key here, so I'd like to underscore it a bit. Som... (by Niccolo)
by hmarid
From QBASIC to C++
 
Hi I have this subprogram in qbasic and I want to convert it in to c++ function. I need your help ...
[4 replies] Last: Yes it is mine ! Thank you . I appreciate your help. Solved (by hmarid)
help with function str cmp
 
hi, I am trying to recreate the strncmp function without actually using the function from the librar...
[2 replies] Last: It would be a lot easier to read this code if you used S1 and S2 ins... (by dhayden)
How to concatenate two const char*?
 
Let's say that you have a const char*, and you want to add it to another const char* const char* ...
[3 replies] Last: Pretty unlikely he meant that. Here's a good tip for the future; we c... (by Repeater)
How to convert an object to a string?
 
So let's say that we have a class called Date for example. And you want to convert an object of a da...
[2 replies] Last: But this isn't working. How do I fix this? In your particular code... (by Repeater)
Running clock? Subtracting gas?
 
I'm in need of help writing my clock function. While my car is on, gasoline will be subtracted by 0....
[3 replies] Last: clock_t begin_time = clock(); //note: not a constant while (1) { c =... (by ne555)
any ideas
 
you are required to design and implement a data structure that works like an array . it minimizes th...
[3 replies] Last: You can fake an array using a linked list. struct s{int v; int loc; st... (by salem c)
March 2020 Pages: 1234567
  Archived months: [feb2020] [apr2020]

This is an archived page. To post a new message, go to the current page.