Beginners - May 2014 (Page 16)

by Relit
Input Validation
 
So guy's i'm trying to validate the persons input, if the person types a number as the answer for (y/n) then it'll go back to main and tell you that you did not...
[6 replies] Last: In simple words if your input fails, cin.fail() then member functio... (by eyenrique)
Dynamic Array, delete
 
Hi All I make a Dynamic Array in C++ , and I want to delete it, But without using delete command, so what will happen if we make the arry pointer point to the ...
[8 replies] Last: But anyone know what delete do to release memory? Don't know if i... (by closed account j3Rz8vqX)
Why is it so hard to display a string?
 
Hi, First,let me mention that I am coming back to C++ from Java, which has a printf() method that is very easy to use compared to what I've seen from C++'s co...
[7 replies] Last: However, I find cout cumbersome and would love to use printf() instea... (by ngbeslhang)
Quick question about inheritance
 
In all the examples I have see or code I've wrote, there seems to be one parent class and the children stemming from that. Can a child class inherit from more t...
[2 replies] Last: Thankyou (by CodeGoggles)
Trouble overloading the + operator
 
Hi, I can overload the + operator as follows: #include <iostream> using namespace std; class CVector { public: int x, y; CVector() {}; CVecto...
[2 replies] Last: Thank you for responding. Putting const in string getRider() const... (by MsPhelix)
Sorting random numbers help!
 
I have a program which generates random numbers within an array However, I have a problem with sorting the elements into numerical order (lowest to highest) ...
[5 replies] Last: Your sort function works. So does your display function. What is it yo... (by Yay295)
by tmason
OpenGL/GLM - Combining(?) Quaterions Accurately from Keyboard/Mouse and other sources ...
 
Hello, I would like to combine mouse and keyboard inputs with the Oculus Rift to create a smooth experience for the user. The goals are: - Positional move...
[1 reply] : Hello to All, So I completely resolved the problem down to a simple... (by tmason)
Quick Question about C++ Maps (reply fast if possible)
 
i have declared a map in map but i cannot access it, this is the declaration: map<map<string,int>,string> op; no errors in declaration. but when i try ...
[2 replies] Last: got it .. changed to map<string,map<int,string>> op; and now works li... (by SrgjanLDTeam)
Using push_back
 
I am looking up an online tutorial for C++ programming and it asks to use a push_back method to get 5 values and save them in an array. I have done the program ...
[8 replies] Last: Thanks for the help on this one. (by DEnumber50)
Creating an ostream with Pair struct
 
I have created a Pair struct to hold pairs but right now it doesn't like the ostream I have created. Specifically, it doesn't like the amount of arguments it ta...
[2 replies] Last: There is already a pair class in <utility> by the way. (by Yay295)
Static class?
 
Can I add 'static' before 'class' instead of adding it before each function to make them all static in this? class Render { void DrawPlayground(); vo...
[3 replies] Last: If all methods are static then you should ask yourself why they are in... (by dhayden)
by locolo
Crazy looping, not going in
 
Why is it not going into the second loop?? char word_validation (char word_player ,int word_size) { char valid_word; int i; // 0 = fal...
[15 replies] Last: Also get rid of line 25. (by fg109)
Visual Studio Debugger bug?
 
A general question about the VS debugger: As I was stepping through my program with the VS debugger, I noticed that a std::vector (which was a data member of...
[1 reply] : I don't know about your example, but perhaps it is the case of run con... (by JockX)
by Auroch
Counting identical words
 
Hello everybody! I'm trying to count the number of occurrences of each word in a text file. But program put in the file the first symbol of inputed word only (...
[19 replies] Last: This is working code with possibility of input closing by pressing "En... (by Auroch)
how can i manage to input a long sentences
 
Hi Im just going to ask how can I manage to input long words such as addresses in c++. Ive tried char but its no use. Can anyone help me? char address ;...
[3 replies] Last: As the others said, the best way for that kind of inputs are string an... (by amirtork)
by locolo
Silly looping not working!!! WEIRD
 
Why line 10 doesnt work?? if last letter is = hold...WEIRD thanks for looking void guess_letter (char word_player , int word_size, char underscore ,ch...
[2 replies] Last: First time through line 10, guess is uninitialized so the results of t... (by AbstractionAnon)
Function with & and without
 
hi everyone.. can you define me difference b/w functions Void duplicate (int& a,int& b,int& c) { ... ... } Void duplicate (int a,int b,int c) { ...
[2 replies] Last: thank you...... (by muhammadmazhar76)
Errors with Classes
 
Hello, so I'm a beginner programmer that's just starting to work with classes, and I'm trying to make a simple bank program that lets you add, withdraw, and add...
[2 replies] Last: Ahhh thanks (by Pacopenguin)
Array in STRUCT does not get filled
 
Write your question here. Why doesn't the scores array from the STRUCT get filled when adding user info? /* * Chapter 11, Problem 4 * * Write a progra...
[3 replies] Last: Thank you Yay295 and benbalach, The fix was for lines 123 and 148: u... (by phztfte1)
by xeltic
Call and compare the same value
 
Hey guys I got this code here that I thought would check if pointed is greater than itself but every time I call info pointed seems to be equal to itself and ca...
[4 replies] Last: The code to check if it is greater than itself would be if (pointed >... (by freddy92)
May 2014 Pages: 1... 1415161718... 55
  Archived months: [apr2014] [jun2014]

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