
please wait
by stanz
Anyone got idea to do this?
|
”Guess the character” |
Feb 22, 2014 at 1:19pm
[4 replies] Last: Please use [ code] tags. Like this: #include <iostream> //#include... (by Duthomhas)
|
by allensark
Input File Assignment Confusion
|
Hi guys, We're going over input files in my C++ class but I'm taking it online with limited direct help. We currently have an assignment where we are required ... |
Feb 22, 2014 at 12:55pm
[5 replies] Last: your cin.getline() function will return the whole line from your text ... (by TECKSPEED)
|
by Furyoku
How to use switch with string?
|
I need to know of how to use switch with string.I know that we can use if and else instead. But I want to know of how to use string directly with switch. ... |
Feb 22, 2014 at 12:41pm
[1 reply] : You can't. Use a chain of if, else-if. if (str == "apple") { std::co... (by Peter87)
|
Purpose of strcat |
strcat(str,” “) ; //whats does it do? |
Feb 22, 2014 at 12:17pm
[1 reply] : http://www.cplusplus.com/reference/cstring/strcat/ (by keskiverto)
|
reference book for c++ in CBSE |
Anybody knows good reference books for c++ in CBSE board for class 12 or secondary 6? |
Feb 22, 2014 at 12:16pm
[no replies]
|
1D array doubt |
Why do we use flag in a 1D array ? |
Feb 22, 2014 at 12:08pm
[5 replies] Last: Thanks a lot for ur help!!!! (by supershooverine)
|
Arrays... what's going on? |
#include <iostream> using std::cout; using std:endl; int main() { short int numbers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; cout << sizeof(numbers... |
Feb 22, 2014 at 11:33am
[2 replies] Last: sizeof returns the size of the array in bytes. cout << 10 * sizeof(s... (by Peter87)
|
by Marnez
Bad memory allocation?
|
When I run my program I get an error message: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc How do I resolve this? ... |
Feb 22, 2014 at 9:36am
[2 replies] Last: Oh my... Haha.. Thank you for pointing out such a bad mistake. (by Marnez)
|
by sajis997
Array of pointers to pointers
|
Hi forum, How to declare an array of pointers to pointers ? Cell mCell = new Cell* ; Is that how it is to be defined? I did it without much of a... |
Feb 22, 2014 at 9:28am
[5 replies] Last: I can't compile incomplete code but it looks fine. Is it the extra * ... (by Peter87)
|
by theperson
I'm having problems using a void pointer to iterate through a SimpleVector template I got from a book...
|
This is basically what I'm trying to do #include <iostream> #include "SimpleVector.h" void* thisReturnsVoidPointer(SimpleVector<int> theVector); int main() ... |
Feb 22, 2014 at 9:20am
[4 replies] Last: I realized that in simplifying my problem into the above code... I did... (by theperson)
|
by mabbia
removing repeated words form array
|
i need to remove repeated words in my 2D array(words). Here is my code int row=100; int col=10; int size=1000; char *my_arr=new char ; char **words=n... |
Feb 22, 2014 at 9:10am
[no replies]
|
by jordy1993
Calculating area of triangle of sides a, b with angle C between them
|
My second program in c++ (1st being hello world) Trying to use the trig formulae ( area of triangle = absin(C) ) However getting odd results and not sure why... |
Feb 22, 2014 at 7:09am
[11 replies] Last: Hi Jordy, First of all, good effort in fixing up your program. Lots o... (by TheIdeasMan)
|
by Marnez
Question - Spaces in strings
|
I'm trying to read int and two strings from a .txt file and store them in the members of each structure array. The problem I have is that when reading the two s... |
Feb 22, 2014 at 6:52am
[10 replies] Last: And I tried using the ignore func but it didn't work for some reason.... (by naraku9333)
|
by theperson
Getting error: expression must have a pointer-to-class type when using a void pointer access methods of a template object
|
I've been trying to use a void pointer to a SimpleVector (a template I got from a programming book) but I always get expression must have a pointer-to-class ty... |
Feb 22, 2014 at 5:58am
[2 replies] Last: Thanks (by theperson)
|
Rock Paper Scissors Lizard Spock |
Im writing the basic RPS program but I have to add in a twist. After writing the code it builds but the computer will not chose, Im not sure what I'm missing. ... |
Feb 22, 2014 at 5:01am
[4 replies] Last: [code firstline=70]if ( CompChoice == 1 ) { CompChoice = '1'; ... (by long double main)
|
by Nukem
Do While
|
Hello I have ran into an issue I can't seem to solve. I am trying to make it so when the user types a random character thats not a number between 3 and 25, the ... |
Feb 22, 2014 at 4:41am
[3 replies] Last: You also haven't accounted for 3 and 25. So maybe if(height>=3 && hei... (by long double main)
|
by ConfigMC
Char array loading from file
|
Hey there! I've encountered some issue with a file loading system I've been working on for an infinite randomly generated RPG game. For now, I'm using a char ... |
Feb 22, 2014 at 4:06am
[no replies]
|
by theperson
What is the best practice for where to put validation functions when I have multiple classes that need to use them?
|
I'm making various general validation functions to check if the user entered a number, that there are no spaces, etc. and I have many classes that have function... |
Feb 22, 2014 at 3:36am
[4 replies] Last: Alright, thanks for letting me know. I had no idea that was possible b... (by theperson)
|
by cory244
Valid input checking
|
Hello I am trying to write a program that will check the input to make sure what the user entered is an integer only. This is it basically, how would I make it... |
Feb 22, 2014 at 2:59am
[13 replies] Last: Sweet that worked I forgot about the c_str() thats what happens when y... (by cory244)
|
by KvltKitty
simple question
|
So idk why I can't remember this, probably cause I haven't done it in a while. But why is it that while(cin >> int) never exits even with blank lines and cin.i... |
Feb 22, 2014 at 2:41am
[1 reply] : cin >> something gobbles up all leading whitespace (this includes ne... (by long double main)
|