Beginners - February 2014 (Page 50)

IF statement inside a switch
 
Whenever I run my program no matter what my input is it will always continue. case 'w': case 'W': cout << "You have chosen to Withdraw from...
[4 replies] Last: See my post that wasn't on your page when you viewed Peter87's post. (by LB)
Sentence program
 
I am new to C++ and am trying to make a program that generates sentences to help me write better. Whenever I run it, it either goes into an infinite loops, or ...
[2 replies] Last: Thank you! (by Jamerack)
Question about handles
 
In class the instructor said "you can use handles to increment pointers in an array" example please. Thanks!
[6 replies] Last: At this point we can only guess at what he is talking about. From the ... (by Computergeek01)
Problem with an excercise
 
So this is the code the book (C++ Primer 5th Edition) gives you // text must be sorted // beg and end will denote the range we`re searching auto beg = t...
[4 replies] Last: Oh, thank you Peter. I got it now. (by closed account EwCjE3v7)
by Chubby
find the highest element
 
How to find the highest element from random number?
[7 replies] Last: i change it and it outter bound: the output is This is the max 20 Pos... (by Chubby)
Simple "Inventory" function?
 
I'm a beginner, that goes without saying - and I have a question that won't be a bummer to anyone who has spent a week more than me in c++. So this is the beef:...
[no replies]
Making a simple shape move in opengl
 
Hello guys. I wanna make the body (square) move left when I press the left arrow key. Unfortunately, it's in data structures and I don't know what to put in the...
[2 replies] Last: for moving the square, there are two ways to do it, a right way and a ... (by NGangst)
Problem with if else multiple condition
 
this problem has been solved...thank you very much forum members :)
[4 replies] Last: thanks for your help...since i wasnt allowed to use cout and cin for m... (by closed account 2zwTC542)
*this Pointer and Overloading Operators
 
Hello! I'm trying to get my head around using the this pointer, and overloading c++ operators. So, can anyone please explain to me why the below two example pi...
[2 replies] Last: thank you! (by geniusberry)
Getchar?
 
I was trying to make a simple greeting program in which the program asks for a name then outputs "Hello, *name*" but it only prints the first letter of the inpu...
[4 replies] Last: what is the cin. ? It works same as your getstring() is supposed to ... (by cyberdude)
Classes C++ and Arrays
 
Write your question here. Hello, I am creating a class that has a private array on the heap with a constructor that takes the size of the array and initializes...
[5 replies] Last: cout<<"thanx"; (by ak16)
Classes C++
 
Hi, I am studying classes and I came across this question. Is it possible that two objects from the same class assess each other's private variables?If so, how...
[2 replies] Last: Is it possible that two objects from the same class assess each other... (by coder777)
Clean up echo output
 
I am writing a program that echos an input .txt file. The .txt file looks like this: (I put this in code format so that the spaces are shown) Bailey ...
[8 replies] Last: > This program has to work with any .txt file using the same type of d... (by JLBorges)
I don't know where to start !
 
Ok I want to learn C++, no one is forcing me to learn C++ or something, but it is my will to learn C++. I need help guys, I have gone from watching AntiRTFM and...
[1 reply] : Namespaces are easy. The just require you to prepend myNamespace:: to... (by Stewbond)
Opening an output file
 
My Proffessor did the following code. What exactly is this code doing? from my opinion, it is opening the file, but I thought to open an output file you do fou...
[1 reply] : Both methods work. In your code, you create an ofstream object, the... (by Stewbond)
by itayz
Issue in a simple program
 
I try to get a random character to be in a map I defined, it doesn't let me; problem in the 'random', it says "Expression must have constant value" Any help? ...
[4 replies] Last: put 24,25,26 right after line 31 (by coder777)
by phil94
Reducing rationals
 
Can someone please walk me through the logic in this reducing rationals syntax. My teacher posted it for us to use in a program but I just don't understand the ...
[3 replies] Last: I love you guys so much. Bookmarking this to study. I appreciate it a ... (by phil94)
by ak16
Virtual base class
 
Hello, what is the size of object of Class child in following case? class Parent { }; class Child : virtual public Parent { };
[5 replies] Last: Hi cire, waiting for reply... (by ak16)
Can't assign int* to int?
 
As the title state I don't understand why temp can't equal to whatever the contents of b is pointing to? void swap (int* a, int* b) { int temp = 0; ...
[3 replies] Last: Though you may want to note that you can make temp equal the contents ... (by Zhuge)
operator overloading
 
When overloading an operator, how many different versions do you have to make? This was brought up because of a homework assignment, so please don't post code ...
[1 reply] : Make it const-correct. // mystring mystring::operator+(mystring& rig... (by JLBorges)
February 2014 Pages: 1... 4849505152... 60
  Archived months: [jan2014] [mar2014]

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