Beginners - October 2012 (Page 30)

error in program
 
following code seems to be fine for me.But it is givving me an error of Lvalue required ..can anyone please tell me what is wrong with the code #include<st...
[1 reply] : You can't increment/decrement " a " because it's not a pointer. When "... (by closed account zb0S216C)
Character I/O, and inputting spaces. (1,2,3)
 
Basically, what I want to be able to do is input this: 1 243 345 64564 567 Note: there are 5 spaces in total between the 1 and the 7. And have it output this:...
[45 replies] Last: As Kealow has already said, the unsetf lines would need to be removed ... (by andywestken)
problem with sizeof()
 
Why am i getting the output of the followiing code as 1 even if there is no character between the double quotes??? #include <stdio.h> int main() { printf...
[1 reply] : Why? Because string literals are still null-terminated, just like stri... (by DesiredNote)
by btbtbt
New to C++ programming
 
I am new to C++ programming and I am going to submit the first exercise to school that I have to create a C++ program as follows: Please input the formula: 1...
[7 replies] Last: It is said to have basic cin cout conditional statement loop and the ... (by btbtbt)
Simple While Loop...so I thought...
 
Ok so this has stumped me for literally around 2 hours... while(mpick != 4) { type_fast("Main Menu\n\n"); type_fast("1. New Game\n");...
[2 replies] Last: Seriously, sometimes I feel so inadequate at times lol...yes and you'r... (by Edwards)
difference between for and while loops
 
whats is the output that statement for( x=1;x<=10;x=+1) cout<<x<<endl; i know the outpout will b 12345678910 but for this statement i did n...
[11 replies] Last: Your reply doesn't make sense, It's OK maybe English is not your first... (by TheIdeasMan)
I need help with a code. eclipse is giving me errors that i dont understand
 
okay, I am coding in eclipse because that is what my class requires. I am brand new to coding and comp sci, this is my first class ever. I can't seem to figur...
[4 replies] Last: Thanks for the help everyone. Eclipse seems to be kind of buggy for m... (by darkmark21)
by dalawh
2D Arrays: Mistake?
 
Did I mess up somewhere? I wanted to create a 2D array similar to... [1 8 7 1] [8 9 6 0] [5 8 4 5] [3 2 4 3] I tried... int arr = {1,8,7,1,8,9,6,0...
[8 replies] Last: When I check to see if that location is NULL That's impossible. An a... (by maeriden)
by kry
Basic problem with do loop
 
This is probably a stupid question but I keep making the same error whenever I create do while loops. Like the code below, my answers always goes 1 number past ...
[2 replies] Last: This isn't a good candidate for a do while loop. while ( (c=a*5)... (by cire)
Using stack to store objects
 
I'm doing a program where I need to store objects in stack. I define the stack as a template class like this: template < class T > class stackType ...
[2 replies] Last: I just figure it out. I forgot to declare the default constructor. Tha... (by HarryPho)
by MW130
How to make a game with images?
 
Hey I want to get further into c++ and want to start using images. I was told to use SDL, but is there any way to do it in JUST c++? and not a third party API? ...
[2 replies] Last: SDL is written in C you know. It's a library that save you the trouble... (by maeriden)
File Handling
 
Something is wrong with my program logic. I am trying to merge to files into one. The program starts, but nothing happens, it doesn't close, and the mergefile d...
[11 replies] Last: And eather, link is bookmarked. Thank you as well. (by ProductFailure)
by Z feng
Tic-Tac-Toe problem
 
This is my code: #include <iostream> using std::cin; using std::cout; using std::endl; void printGrid(const char ); void goX(char ); int main() {...
[5 replies] Last: You never update xChoice within the while loop. (by Lowest0ne)
SOLVED
 
SOLVED
[no replies]
Having a hard time with nested if statements
 
I am new to the forum and to the programing world and i have read the rules. This is a homework question but i dont want a solution i just need help with this p...
[5 replies] Last: ok i think thats it. Im on it. thanks (by Victor714)
C++ Program Help
 
Hello all, I have a program that shuffles cards and orders them a specific way. My program runs, but there are logical errors that I cannot find. If yo...
[3 replies] Last: Maybe. I can't say if I don't see the code. If you want to PM me feel ... (by maeriden)
by NOFYE
Help
 
Please help, here's the question and what I have. Let me know if I'm on track: Write a value-returning function, isVowel, that returns the value true if a g...
[8 replies] Last: "letter" has no way of getting into the function isVowel unless it is ... (by BrentSpinor)
by veeyik
Why i get the address instead of the result?
 
Im doing a question that asked to include a header of area function to find the area of the triangle if the input is valid. Here are my codes for the header and...
[7 replies] Last: Hello guru's and gods of C++; I did make an error here in the funct... (by SquattingDog)
Linked Lists Segmentation Fault
 
Hello, I am writing a program that reads in data from a text file and puts it into a linked list. Certain variables are read in only if the "officeHeld" numb...
[5 replies] Last: Switch line 103 with 104? (by Lowest0ne)
Adding a Node to a Linked List
 
Hello, I have run my code through VS debugger, and there are no warnings or errors. My code reads in information from a file and puts it into a linked lis...
[2 replies] Last: Line 93 should be outside the loop. (by cire)
October 2012 Pages: 1... 2829303132... 84
  Archived months: [sep2012] [nov2012]

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