Beginners (Page 8)

SUPER BEGINNER class question
What are the contents of the two Name variables after each of the following statements assuming they...
[2 replies] Last: Your output is correct. Well... except for the yourName=^ and myName=... (by discofire)
Need help with a hw question that involves structs and functions
to keep things simple the question asks me to read a menu for restaurant from a file, have the user ...
[4 replies] Last: Thanks Yanson, that worked. :D (by unkn0wn0192)
Nested loops
Hello can someone help me understand the first if statement, i know what % does but both i and j are...
[7 replies] Last: What i still don't understand is when does 'j' go up because both the ... (by Jacobhaha)
help understanding std::string erase
Hello, i have been looking at strings and im curious why the code snippet attached doesnt remove all...
[5 replies] Last: Thanks a ton :). (by Ozwurld)
Multi String Array Program
Here is the problem: Write A Program That Allows You To Enter Cd Names Into An Array Of Strings And...
[1 reply] : I figured it out... #include <iostream> #include <string> using n... (by dash127)
Global class member?
Hey, I'm new to the forums, and got a little question =]. Let's say that I've got a class wich...
[4 replies] Last: Sorry, I did not pointed out, but in my program, it's not actually a f... (by Vect0rZ)
Switch statement vs if else
They seem like they are the same and can both be used for the same program so my question is is ther...
[7 replies] Last: I don't know of anyone who recommends switch as bad practice. The swi... (by Duoas)
Array Initialization
How can I put default values to all the elements in a char array. In an array of Integers, We can ...
[7 replies] Last: @keskiverto: Thanks, I get it now. I'm gonna try the one-liner and see... (by newbie456)
character arrays
If wanted to take a character array such as "Hello! Whats up?" and wanted to turn it into this: "hel...
[2 replies] Last: Excellent! Thankyou (by RobHubbard)
Using variable in System() function?
Hello How can I use a variable in the system() function? Like this: string a; cin >> a; system("p...
[3 replies] Last: Thanks all! :) Worked like a charm. (by Nielyboyken)
Printing the largest number from a .txt file.
Hello, I need to print the largest/smallest number (age) from a text file along with the Name of th...
[no replies]
Practical use of code?
I have had no issue learning the use of cout and if and else if and while/for, #include <cstdlib> .e...
[8 replies] Last: If i remember right, the book I linked earlier uses an inventory to ex... (by admkrk)
Using the sprintf function? C++
Hello I try to use the sprintf function but it doesn't work, could someone explain me what I am d...
[9 replies] Last: Code doesn't work, I tried to edit it my own way as well but still no ... (by Nielyboyken)
"Opposite" of
Is there any way to detect when cin succeeds, like how looks for when it, well... fails?
[3 replies] Last: Alright, that makes sense. Thanks! (by Reality Check)
Re start a program
Practicing my if/else functions with a simple number program that asks the user to input and carry o...
[8 replies] Last: you should use do while loop here. Here's the fix code #include <i... (by Lorence30)
by Ganado
Efficiency of public access vector
In the following example class A is defined below, and class B is some unspecified type (if it makes...
[no replies]
Set terminal size in Linux bigger?
Hello Does someone know how to set the size of the terminal in Linux bigger using C++? I know ho...
[4 replies] Last: ^Yes but if I don' t change it the text doesn't fully display, and I t... (by Nielyboyken)
confused in diferentiating between virtual functions and redefined functions
Hi there, i need some help on an issue am having as i try to understand the need to use the modifie...
[4 replies] Last: thank you very much, lemmi try look it up (by andy1992)
by zionet
Generate N Perfect Numbers???PART II
The method of rapid generation ago by Euclid np=(2^(n-1))*((2^n)-1), n is number prime, that's what ...
[1 reply] : I dont understand what you are saying or asking (by shadowCODE)
Non-const Ostream Object Overloading <<
Why can't os be const when overloading the << operator? You don't want to change os, right? ...
[2 replies] Last: Peter87 said it all (by shadowCODE)
Pages: 1... 678910... 45
  Archived months: [jun2014]

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