Beginners - November 2014 (Page 42)

by iluv41
two arrays
 
I have two c style arrays that are passed in and added together My issue is that if, for example, x = 111 and y = 2, the sum ends up being 211 instead of 112...
[4 replies] Last: Line 54 should be sum.number[sum.currentLength] = 1; . In other words... (by dhayden)
Help with getting rid of comma in last number
 
I am having difficulties getting rid of comma in last number...Can someone please help me on how I can get rid of the last comma in the last number i greatly ap...
[2 replies] Last: Do you mean the commas that separate the numbers? The trick is to pri... (by dhayden)
Function Fun Mysterious Error
 
Hey all so I'm writing a program demonstrating function calling in main. I tried building it but I got an error message I cannot decipher. here it is: 1>Func...
[1 reply] : You repeated almost the same error again haha int getInteger(int Hei... (by closed account SECMoG1T)
by drax
boolean help
 
Hi, I have a problem with this piece of code. When user enters the same name more than once I get multiple output "You entered that name already", and not only...
[14 replies] Last: thank you both very much for your help! (by drax)
Recursive Function
 
Hey guys, I have a problem with a recursive function I'm trying to write. The purpose of the function is to find a string within a string and then return the i...
[8 replies] Last: Your code has a bug which prevents finding substring not at the end of... (by MiiNiPaa)
by Ch1156
Getting leftover string contents from input buffer
 
I am reading books to improve my C++ and I wanted to try to get the leftover input from the input buffer after using the delimiter in getline(), this code works...
[5 replies] Last: So instead you want to read input left until line end? Use std::getlin... (by MiiNiPaa)
Function Argument Error
 
Hey so I need to write a program to show functions being called into the main function. When I try to build I get an error saying my printbox function doesn't t...
[3 replies] Last: ah I swore I checked that but obviously looked at a different one. Tha... (by MrBond90)
Issue with switch statement
 
I'm having an issue with my switch statement. The functions are supposed to read random access files. When I run the program, it displays the menu and when I ch...
[5 replies] Last: Thanks! All suggestions helped! Also, I figured out why I couldn't k... (by anonymous1126)
This random 2?!
 
Ok, whenever i input an even number' it keeps adding and additional 2. ex, if i input 22 it should list 2, 4, 6 .... 22. but instead it stops at 24. Why is t...
[3 replies] Last: #include <iostream> int main() { int number = 1 ; while( std... (by JLBorges)
vector push_back not working
 
So this should print 12345, but it actually prints 00000. I cannot figure out why. #include <isotream> #include <vector> vector<int> suitors(10); for(...
[3 replies] Last: Ahhhh gothca, that makes sense. Thanks!! (by pilotnate)
help with arrays and loops
 
Trying to create a program that has arrays to take grade entered and spit it back in the same order with a mark of A, B P U if below 50%, then calcs the average...
[no replies]
While infinite loop with cin
 
In the function Decide under my switch-case there is code that will get scores from the user and if the score does not fall in between 0-10 it is supposed to sa...
[1 reply] : I don't understand the problem? It does say error when you input the s... (by Jacobhaha)
How can I make a program that will read a different amount of input?
 
I know you probably didn't understand the question, but let me rephrase it in a different way. Let's say you have a program that has 5 variables that need to b...
[1 reply] : just add an abort input, that let's you stop reading further variables... (by Darkmaster)
I/O question #2
 
I tried to get this answered on a separate thread but nothing was satisfactory or concrete. Listed below are two codes. The first is my code and it works perfec...
[3 replies] Last: it wouldn't run at all saying that the stream code was invalid somethi... (by smokebaca)
question about inheritance
 
ok,so i have 3 classes,we'll just call them a,b and c. c is a general purpose class,so a and b both inherit c. now,everything works fine,but the problem is,wh...
[6 replies] Last: Take a look at this and see if it makes sense: http://ideone.com/eXhZT... (by Smac89)
need some help for fixing this c++ code
 
hello guys, right now i get some problem in the vector. when i write the code below and run it, i can not get what i need. the problem: 1)when i call the funct...
[1 reply] : You would like to only work with numbers greater than 100 in your dete... (by disturbedfuel15)
cin.ignore() to skip \n intermittently fails
 
Below is the beginning of a C++ program that uses fstream to write a structure to a binary file. I have tried to use cin.ignore() to skip over newline chars...
[3 replies] Last: For comments: out on the right side you see a few buttons one of the l... (by Jacobhaha)
Overloading the Assignment Operator
 
Hello everyone! I was just going through some old code that was in the 'should work on' folder when I came across an old code scrap that overloaded the assig...
[4 replies] Last: Thanks! (by geniusberry)
Problem with functions
 
What am I doing incorrectly?? Create 3 additional functions: progDept, dbaDept and gameDept to handle the call within the programming, database and game develop...
[1 reply] : You didn't make any functions to begin with! Edit: Here is an exampl... (by Mesmaroth)
Linked List - Stack
 
Hello, I need help because my destructor is not working, I need some help because it is the only thing left that I have to do and I dont know what is wrong. ...
[no replies]
November 2014 Pages: 1... 4041424344... 65
  Archived months: [oct2014] [dec2014]

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