Beginners - May 2013 (Page 58)

how do string accept characters having spaces?
 
how do string accept characters having spaces? Or do you know other ways to accept spaces? Let's say for a name. string first; string middle; strin...
[1 reply] : Use std::getline function. For example std::getline( std::cin, first ... (by vlad from moscow)
C strings
 
Can anyone help me? Can I assign string in C? on C++ it works like this, string name = "david"; if(name == "david"){ cout << "it will print" << endl; } ...
[2 replies] Last: Thank you :) (by Datolius)
GUI
 
Hi. I don't understand how to make design for C program, I mean GUI programming, I try some code but it doesn't compile I don't know why. I use Pellec C compile...
[1 reply] : There is no such thing as "does not compile". There is "compilation fa... (by keskiverto)
Fibonacci
 
the sum of the printed numbers? #include<iostream> using namespace std; main() { int n, c, first = 0, second = 1, next; cout << "Enter the numb...
[no replies]
Colored shapes
 
Hello, I have an assignment to make a colored shape. Can some one tell me how do I do it?
[4 replies] Last: struct rectangle { enum colour_t { WHITE, RED, GREEN, BLUE, MAGEN... (by JLBorges)
Static (?) class
 
Hello All, I want to create a Math class with some special functions in it. So far I have created this class and then inherited it into each class that needs...
[1 reply] : You can do like //Math.h class Math { public: static double sin(d... (by MiiNiPaa)
class program
 
Write a program that listed all the capitals for countries in a specific region of the world. Create a countryType class to store the information. This class wi...
[2 replies] Last: well, i know how to create an array, but not a class. i don't know wha... (by irkzuptang)
I hate programming
 
Hi guys.I'm writing this message with my eyes full of tears :(.. The problem started after my grade during high school.I was not able to enter Faculty of Engin...
[6 replies] Last: You do not have to be a genius to program nor have the best grades bec... (by backslashx00)
Matrix multiplication
 
Now i have a problem to calculate multiplication of matrix that's not the problem i wrote it but the real problem is that i have to write it in function and i...
[12 replies] Last: any help ??? (by elattar)
Need help with my snake game
 
Hi guys I'm new here and I need help with my code. The code i'm using is already used so I want to make it look mine. I have 4 question 1.How Can I put a s...
[11 replies] Last: Technically speaking, plagiarism is not against the law. However, it i... (by Daleth)
help me please....A function to read vector???
 
A function, called ReadVector(), which reads a vector of any size from a given file name, and returns the vector and its size to the caller. The function protot...
[no replies]
by jag64
Creating a Hashing program?
 
Writing a C++ program that: (1) defines and implements a hash class that constructs a 23 element array (may be implemented using a vector, a deque, or a list, ...
[12 replies] Last: [quote=cire]Neither sum , nor i , nor hashword , nor firstlet , no... (by cire)
while (!ourfile.eof) not working
 
Hi! I'm writing a program to manipulate data from a text file. The text file includes names followed by the data (ints) associated with that name (e.g., "Name1 ...
[5 replies] Last: Just kidding. After I just input.clear(); after the input>>number loop... (by Jacob Curtis)
by Vash
Having trouble formatting whitespace when reading from a file
 
So in this program im supposed to be reading characters from a file. So i opened the file and read them into an array, this is the assignment Write a C++ pr...
[5 replies] Last: blastspace is used to know if we have continued spaces. It is set to t... (by writetonsharma)
array of different types
 
Im trying to put a Point a Circle and a Cylinder (3 different classes deriving from each other, point deriving from Shape)inside a base class Shape array. But ...
[5 replies] Last: @spiritedDedication My base class is shape. Point derives from shape... (by TheIdeasMan)
How do I use a pointer of a parent class to call a child's function?
 
How come when I use men ->attack(men ) it only calls the basic man attack function and not the derelict function? Is there any way around this? #include ...
[2 replies] Last: virtual http://www.cplusplus.com/doc/tutorial/polymorphism/ And mak... (by JLBorges)
Data Structures, would appreciate an example of something in particular. (See post for details)
 
The following is from the documentation of the site we are on right now under: Pointers to Structures . http://www.cplusplus.com/doc/tutorial/structures/ ...
[3 replies] Last: Thank you both very much. Thank you aceix and thank you cire! Marked ... (by warryan)
by bdwg
Passing Polymorphic Pointer to Pointer into Function
 
In trying to pass a pointer of pointers from one function to another, I lose my objects somewhere. #include <iostream> using namespace std; clas...
[1 reply] : void interpolate(function* infunc) //pass a copy of the pointer { ... (by ne555)
by fetzjr
SFML Code will not compile?
 
Okay so i am follow a youtube series on SFML 2.0 By the first lesson i am already encountering problems. Here is the video: http://www.youtube.com/watch?...
[1 reply] : That 'sfml::Renderwindow' needs to be 'sf::RenderWindow', plus 'int ma... (by closed account D3pGNwbp)
by odai
small help !!
 
is there any code for template queue class using vector !!! or how can i write this class !! please help me !!
[3 replies] Last: Both vector and queue are templates. A vector of queues is simply: ... (by AbstractionAnon)
May 2013 Pages: 1... 5657585960... 66
  Archived months: [apr2013] [jun2013]

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