
please wait
by memepapa
returning 32767 instead of -1 in Binary Search
|
Need help reviewing the recursive code. The iterative version works, but with the recursive version, it returns 32767 instead of -1 when "6" cannot be found. ... |
Feb 2, 2022 at 4:36pm
[11 replies] Last: include <iostream> int binarySearch(const int* arr, size_t low, siz... (by seeplus)
|
by iconic11
Getline prints extra line from text file
|
Hi, im new to C++ and im very confused as to why does the getline prints the extra content after I split the string with a delimiter also is there a better way ... |
Feb 2, 2022 at 11:10am
[3 replies] Last: #include <iostream> #include <string> #include <fstream> int main()... (by seeplus)
|
by vectorI
Print first and last element of a vector
|
Read a set of integers into a vector. Print the sum of each pair of adjacent elements. Change your program so that it prints the sum of the first and last ele... |
Feb 2, 2022 at 10:48am
[2 replies] Last: Possibly using iterators: #include <iostream> #include <vector> #in... (by seeplus)
|
having problems with Time-Sfml |
I'm trying sfml but I just can't seem to get the hang of TIME, for some reason this function here doesn't work as I would expect it to? #include <sfml... |
Feb 2, 2022 at 9:33am
[1 reply] : it just prints out the limit? even when the timefr is greater than t... (by lastchance)
|
by Nick72c
Help With Headers
|
Can I ask why in C++ you put the function prototypes / declarations in a .h / .hpp header file, with the functions in a .cpp implementation file? As a novice... |
Feb 2, 2022 at 2:42am
[13 replies] Last: Use the C++ library headers and there is no extra compile time, the C+... (by deleted account xyzzy)
|
How can I parse a char pointer string and put specific parts of it in a hash map in C++? |
Lets say I have a char pointer like this: const char* myS = "John 25 Los Angeles"; I want to parse this string and put it in a hashmap, so I can retri... |
Feb 1, 2022 at 9:41pm
[1 reply] : with what you have, its pretty much myMap["John"] = myS; //you should ... (by jonnin)
|
Pointer |
what the difference ? how can we read this two lines. iPoint = &number; *iPoint = 40; |
Feb 1, 2022 at 9:45am
[2 replies] Last: L2 iPoint is set to the memory address of the variable number. In this... (by seeplus)
|