No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hello all, I am having a mental blank on checking user input (that is string) to check if it contains an integer value. as in: [code]for(i=0;i < nNames; i++){ cout<<"\nEnter a last name: "; getline(cin,name[i]); [/code] I have checked the C++ string class for string.length() and others, I am just … |
|
OK, I have been out of the loop with C++ for a year now. I am finished with school, so this is NOT homework. Just trying to clean up some old assignments for future references. (the code is in "messy" shape til I can get it working properly and clean … |
|
[B]Program goal[/B]: user input for 2 equations to evaluate the operator signs. i.e. 1 * 2 + 4 - 4 and 5 - 2 * 6 + 9 would be the same --> " * + - " in both, order does not matter. [B]Output[/B]: cout saying match or not … |
|
O.K., I have a project I'm working on. It uses 8 classes (I'm only showing 2 and main). It gives me a "bad_alloc" error when the obj is instantiated. When obj is removed it works fine (or call the personType class that "should" be inherited from extPersonType.) Any thoughts of … |
|
Why is it, when I compile this, the cout statement runs twice at first? It does not do that when I have the rest of the code in there that is int. Any thoughts of why or what I am doing wrong.. #include <iostream> #include <string> using namespace std; int … |
|
OK, I have a assignment due to use dynamic arrays to make a program that requires user input.It has to be dynamic array, and we never went over vectors in school..as I've seen it used in other not so similar programs, and the result is tabular output like: Canidates Votes … |