Beginners - February 2015 (Page 40)

c++ help
 
If anybody knows c++, I could really use some help. http://www.cplusplus.com/forum/general/156027/
[no replies]
Structures Help
 
I am completely new at this, and I am trying to understand how to make this work...Here's the thing, I need to create a program with a nested structure...One of...
[no replies]
Card Game- returning Card points
 
Im working on a simple war card game, however Im having a problem returning the points for each card. I believe the problem is on the getCardValue function. Can...
[5 replies] Last: I truly cant see what Im doing wrong, I thought my loop was just iter... (by AbstractionAnon)
by gkayes
Ignoring extraneous characters in input
 
Hey! Working on a project and I need help with ignoring extraneous characters. For the input you have to input a dollar amount (ex. 1000). I need to write in C+...
[2 replies] Last: how so? this is my code cout << "What is your loan amount? ($ A... (by gkayes)
by bsears
Char, %c, won't print
 
Got some homework I'm working on and I'm having issues getting a char datatype to display, or maybe it's not reading the input prompt. I've tried a dozen diffe...
[5 replies] Last: I agree. Fortunately for me, I primarily code C++ and not C, so I don... (by Disch)
Code works in one compiler but not another
 
Hi everyone. When I run this code in Xcode it works as it is supposed to. When my friend runs it in Visual Studio, the program gets the phrase from the user b...
[1 reply] : Sounds like http://www.cplusplus.com/forum/beginner/1988/ (by keskiverto)
reading from a file
 
example file: 123 - washington, DC 111 - new york city, NY 117 - san fran, CA //and it goes on.. how do i read only the numbers and ignore the "-" ...
[no replies]
by HelenI
While
 
Hello, My while is endless and i can't understand why. #include<iostream> #include<queue> using namespace std; int main(){ int i; char a; qu...
[8 replies] Last: @gibit I know that; however the code to see if cin is not good is much... (by koothkeeper)
Can't get a While Loop to Compile Properly
 
Greetings. I am a complete beginner on C++, but have worked in Matlab a lot. I feel embarrassed for even having to ask this, but I think it is a compile problem...
[5 replies] Last: So that means I'm not crazy, something is wrong. I found if I do varyi... (by DeepSilenceSSN)
How to code basic calculation without if statements?
 
Hey guys, I'm just starting out and trying to build a rudimentary calculation program. Users input two numbers and an operand in one function, and the next func...
[3 replies] Last: Huh, didn't even know about some of these statement types. Thanks! :) (by hereticforlife)
Caeser Code (1,2)
 
I've been instructed to create two Caeser code programs. One that encrypts messages and the other that decrypts messages. The function return is bool and if the...
[27 replies] Last: Yes. if(c >= 'a' && c <= 'z') { //... } else if(c >= 'A' && c <= '... (by LB)
by Kman
Counting number of spaces in a given sentence with a function?
 
I'm at a loss at how to go about this. I know I have to have a for loop, then use ++ as necessary, but I'm stuck. Here's what I have so far: #include <i...
[9 replies] Last: It works! Thank you all again! (by Kman)
by cibide
Declair a variable
 
Guys, sorry to bother but can anyone explain me how I should declair x variable in this case? I am always having problems with it and I cant find a solution... ...
[2 replies] Last: ok ty! (by cibide)
by DWS13
Trying to use a increment counter in a while loop
 
I am trying to use an increment counter in a while loop for multiple selections and my counter for the first expression entered is incrementing correctly, it is...
[2 replies] Last: Thanks for the help!!! (by DWS13)
Array average program
 
I have a program that averages numbers. It works perfectly, but I need it to work with multiple functions and arrays. I'm stuck on figuring out how to get it to...
[5 replies] Last: It's difficult to help when one do not understand the problem. What do... (by OxBADC0DE)
by HelenI
* problem
 
i have to solve a problem that says if the character is an '*' pop an item from the queue and if it's not push that character into the queue. this is my code bu...
[2 replies] Last: i only had to change the for with the while :) thank you (by HelenI)
Ambiguous Error
 
I have a simple code but a lot of the couts say they are ambiguous. Any help is appreciated, I don't know what is causing this. I am running this on Microsoft V...
[2 replies] Last: That worked for me as well! thank you so much!! (by dgdaniel23)
How can I make this function work?
 
Ok so I have the function declared at the top before main void read_data (string firsts , string lasts , int ages , int total); I also have the funct...
[5 replies] Last: Thanks it worked this is exactly what I needed to do! (by agamatr)
Implicit and explicit copy constructor call
 
Hello. In the following code which is implicit and explicit copy constructor call? classname obj1; classname obj2(obj1);// classname obj3; classname ob...
[2 replies] Last: Did you Google this at all? The first result has your answer. The sec... (by twiggystardust)
i need help with the unbelievable output of this program?
 
please explain me this program, how x value retains its original passed value i.e., 2 and y value has changed its value as 15 while returning to main()... ...
[4 replies] Last: got it...crystal clear...thanks to ulutay ,java 90 and militie for you... (by karthik8913)
February 2015 Pages: 1... 3839404142... 52
  Archived months: [jan2015] [mar2015]

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