by admin
Welcome -- read before posting!
Welcome to the beginner's forum in! In this forum, users can to talk about any topic relate...
[2 replies] Last: How To Answer Questions in a Helpful Way Be gentle. Problem-relat... (by admin)
Console Closing Down (1,2,3,4,5,6,7)
Hi, i am new to C++ and have just written my "Hello World" program. It worked all right but the cons...
[120 replies] Last: It displayed "Hello world" after you pressed Enter. int c is a ... (by Duthomhas)
by vysero
Variable instantiation
I am confused about some feedback I got: "Member variables should be instantiated in the class co...
[4 replies] Last: In your first post, all you mentioned was that you got feedback. You d... (by Ganado)
Student and class does not name a type
Hey guys, I'm making a simple school management system, that keeps track of students grades atten...
[6 replies] Last: I defined Class in a separate cpp file in the same project but the com... (by adam2016)
UML class diagram to code translation (1,2)
Hello Everybody, I have translated the following class diagram (click on the link below) into c+...
[23 replies] Last: we can circle back to it but even with advanced algorithms like that, ... (by jonnin)
by raneie
Arrays with integers and strings?
Hi! I'm working with arrays and I'm wondering how I would put an integer and a string into the same...
[4 replies] Last: it depends on what exactly you want. you can store integers as text, ... (by jonnin)
Dividing contents of 2 dimentional array into one array
Why does my avgHi array output zero if I divide the contents of the two arrays but if I add or subtr...
[2 replies] Last: Thank you. I was able to fix this by adding (float) to one of the numb... (by Esmith0550)
by Ch1156
Best way to go about doing this
So Im trying to strengthen my knowledge of using classes correctly and i've come a little further. I...
[10 replies] Last: hmm, well mainly what I want to do is when the player chooses a class,... (by Ch1156)
Take in 'x' amount of a string and reverse it
Hello, folks. The main objective I am trying to accomplish is taking in a user string and saving the...
[5 replies] Last: #include <iostream> #include <string> using namespace std; string ba... (by lastchance)
getting program to end loop and count properly
Hello, I am a new student learning C++ and I am having trouble with my program for a class that uses...
[1 reply] : Line 30: Word is a c string. What you do is comparing the pointers w... (by coder777)
Random number for 10 to 99
The question was to generate a random number from 10 to 99, inclusive. I know enough to write the co...
[2 replies] Last: I think you should change this cout << (rand() % 98 + 1) to co... (by digozido)
help creating a vector of classes
I am learning to use classes and i want to create a vector of classes. i can create the class and t...
[10 replies] Last: Enoizat brings up a very good point about how to access a vector's ele... (by Furry Guy)
Breadth first search and depth first search examples
Can someone post a code for each traversals using strings? I need to get some ideas where to start....
[no replies]
MonteCarlo Integral Program bad results
First shot at coding MCI. I can't figure out how to generate random floating point integers which wo...
[7 replies] Last: Ahh, how could I miss that!? I had it in my pseudocode too. Thanks for... (by jgialis)
abstract class error
Hey guys, so a pretty beginner exercise but I decided to give it a shot, it's from a book I am curr...
[2 replies] Last: *edit again, spotted the bug I subtracted 10 instead of 0.10 now fixed... (by adam2016)
Difference between std::strings + and += operators?
Hey guys, so I noticed the + and += operators give much different results, I have written a print...
[5 replies] Last: I thought they would essentially provide the same function when work... (by Furry Guy)
I need to open new counter when old one closes
I am making a larger program that has the following part: I will avoid putting the larger one and ...
[4 replies] Last: void foo(int * ip, int size) { code... } int x ; foo(x,3); //pass i... (by jonnin)
by Zii
Why is (10*5) giving me 2?
I mean... I really don't get this. Line 21... Yet when I run the program it gives me: Name : Joh...
[4 replies] Last: I don't see anything about it mentioned in the screenshot example abo... (by Furry Guy)
What's the difference between . and ->
There are two operators . and -> in c++,I know when you want to get a variable or function of an obj...
[4 replies] Last: But what does b.val mean? Nothing. It's illegal syntax, assuming... (by MikeyBoy)
by Brail
Can anyone tell why I am getting an 'a' instead of words without 'a' in string? #include <iost...
[3 replies] Last: Hello Brail, I found that the real problem is with the if statement i... (by Handy Andy)
Pages: 123... 30
  Archived months: [sep2019]