Beginners (Page 29)

Converting between data types? C++
I'm getting an error saying cannot convert char to double. i declared double and int type in the s...
[2 replies] Last: Helped me out so much, thanks a lot it worked! (by tidematic)
invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]
how do i fix this? //Tests if the C string str starts with the specified prefix, the C string ...
[8 replies] Last: ok, goodness. I think this covers everything except null pointers pa... (by jonnin)
by evdo
doesnt work
"You have to create a class, named Student, representing the student's details, as mentioned above, ...
[2 replies] Last: Also, you have to create another method to_string() which returns the... (by Thomas1965)
C++ goto replacement
Hello, I am beginner in C++ and I would like to ask you if this is a good replacement for goto or no...
[8 replies] Last: No. Structure your code so that it does not need goto -like construct... (by Duthomhas)
String array as object params
So, basically, I have a Question object with the constructor Question(string question, string answ...
[7 replies] Last: Ah. So my error was because I was instantiating it as a vector rather ... (by The hemporer)
Using a function in another class
I'm trying to use a function from another class (my Question class) to basically run the game, but i...
[2 replies] Last: I'm an idiot. Thank you. (by The hemporer)
C++ Quincy beginner code question
I am having a hard time creating a code for this: If TEST score is less than 80, then increase TES...
[3 replies] Last: To give you an idea... #include <iostream> int main() { const int ... (by chicofeo)
Importance of storage
I want to know that whether storage is an issue with respect to current hardware and software market...
[3 replies] Last: storage is huge on some systems, like mobile devices or embedded compu... (by jonnin)
by YikUTM
Convert string to char. No desired output
I tried to convert strings which are read from external input file into char however I didn't get my...
[7 replies] Last: That works. Use that instead! (by jonnin)
Forward declare objects in C++?
Hi there! I just made this code and I can see why it isn't working but not how to solve it. So I ne...
[9 replies] Last: I will mark this thread as solved now. This is pretty much my final co... (by Sigge414)
by m mohy
where is the error?
I am trying to write a code to calculate the angle between a point on line and another moving point,...
[7 replies] Last: @jonnin It is supposed to calculate the angle between a moving point, ... (by m mohy)
by Rodev
cout string without including <string>?
Hello, I was testing some code and I found out that I didn't need to put "#include <string>" in o...
[9 replies] Last: This change (single-element braced-init-lists initialize directly) was... (by JLBorges)
Unexplainable Errors
I'm trying to write a code that will find the smaller number between to numbers and print the smalle...
[2 replies] Last: You also need to call the function you created after receiving the sec... (by II47II)
Using user inputs in functions
Im writing a code for class that takes 7 inputs from the user as cards and tells them their best pok...
[4 replies] Last: God I'm stupid! Your comment made me think why i used pointers in the ... (by MitchH29)
by YikUTM
Unwanted blank line in output
When I run my program, it printed an unwanted blank line. Is there any way to fix this? The output ...
[3 replies] Last: Your input (underlined) is: david 34 24 ls 45 35 haha 56 23 Note ... (by dhayden)
Saving data from 2D-array to a text file.
Hi, I have done lots of googling but I have a 2D-array of type double and I want to save it to a f...
[3 replies] Last: Thankyou for this @fiji885 it worked perfectly! @lastchance for this p... (by indiarose27)
by hoogo
Sort algorithm on vector of structures (1,2)
Hello people! I've found a few posts here and there about people having the same problem as me bu...
[26 replies] Last: Think of threads, parallelism. Two threads execute simultaneously. Yo... (by hoogo)
Beginner C++ question
I have never used C++ before and I need to design a program to do the following: The BONUS on a s...
[2 replies] Last: int main() { unsigned int sales = 0; std::cout >> "enter sales\... (by Pintujoshi)
Random Number Generator Error
The following is my code, I have the GetProduct function down, I believe I possibly have the printEv...
[1 reply] : srand() goes in main(). But, since this is C++, you might as well do i... (by Duthomhas)
Array of Struct
I have to write a program where it takes in data of name, id, rate, and hours. I have to use an arra...
[2 replies] Last: #include <iostream> #include <string> #include <fstream> struct P {... (by fiji885)
Pages: 1... 2728293031... 45
  Archived months: [dec2017]

Cannot post in this page. To post a new message, go to the first page.