Beginners - November 2011 (Page 30)

by moot1
random # generator
 
why does it have the errors in the underlined piece of code.the error is " `cout' undeclared (first use this function) " and "`endl' undeclared (first use thi...
[3 replies] Last: No, it isn't. You didn't specify where the cout object was. Also, I ... (by ascii)
Tic Tac Toe Help
 
Hello, I'm doing this program that wants me to make a tic tac toe game using a two-dimensional array. And the array is initialized with an asterisk ('*'). And t...
[11 replies] Last: That was it! I should have caught that... thanks! Next task... get t... (by nerd1981)
Help with friend functions
 
How would I do this without making the entire lunch class a friend of school? Whenever I tried friend functions I couldn't figure it out. #include<iostr...
[2 replies] Last: I looked to it very quickly: at line 83 the class Lunch is accessing ... (by samusamu)
by velcro
Prevent errors from accidental menu entries?
 
Here's my code & output. I can't figure out how to keep my program from turning accidental menu option entries into repeating the menu or, worse, putting accide...
[10 replies] Last: Thank you WilliamW1979. I'll try that after I figure out this other pr... (by velcro)
while loop to a for loop
 
I did my code but i didnt read that it had to be on for loop so how can I convert this to a fol-loop? if (firstNum % 2 == 0) counter = firstNum + 1; else ...
[8 replies] Last: Thank you! Huge help! (by nyaeggy)
Help with array function simple linear
 
I have been working on this array for about two weeks now and I can't seem to get it right. The idea of the array is to take a number between 10 and 100 and add...
[6 replies] Last: Guys, thank you all for your suggestions. fun2code, I got you... (by rinnamorato)
by nebula
Constant numbers as parameters
 
Hello guys. How should I pass constants previoulsy defened as parameters of a funtion. For example, #include <cstdlib> #include <iostream> #define apple...
[3 replies] Last: #define apples 10 #define oranges 40 void f1 (int apples, int ora... (by Disch)
Condition in if statement is violated
 
Hi. I have a problem whit the next code (an extract of a medical program) when I use 'if' and 'else if' statements. When the funtion f_cT is evaluated in the 'c...
[4 replies] Last: Yes I refered as a suffix. Thanks. (by afrodriguezg)
Bitwise operators and registers
 
Hello! I wonder, how can i tweak ON OFF a single bit in register REGx with adress 0x13001200 and write the value back to the same register. Ty.
[5 replies] Last: Faster? (by kbw)
problem with sin equation (1,2,3)
 
i want to output the answer to a sin equation in a file. my code is my first attempt i've probably made loads of mistakes. this is what i have so far: #...
[43 replies] Last: the equation im trying to use is possible its part of the Fourier Ser... (by Moschops)
error: invalid use of member (did you forget the '&' ?)
 
I'm getting this error on lines 77 and 84 of intstack.cpp. I spent an hour searching the web but I'm still not sure what to do. Any hints? intstack.h #prag...
[2 replies] Last: Fixed all of that, thanks. I'm now running into errors saying all of ... (by AndroidZ)
Member function not working with second object.
 
So I've been trying to learn OOP with C++ and this is my very first OOP type program. Supposed to create a class with 3 "attributes": first name, last name an...
[5 replies] Last: Solved. I should have paid more attention to fafner's posting. While... (by StepLeft507)
by moot1
how do i fix this error??
 
all of the underlined peices of code say this"expected ; before string constant" how do i fix that -thanks,moot using namespace std; int main(){ ...
[11 replies] Last: its on the first page (by moot1)
Sudoku program troubles
 
Hey guys. I need help with a Sudoku homework problem. The problem is... Create a Sudoku program in which the user enters a sudoku puzzle. The program will then...
[no replies]
by moot1
improvement
 
hi.i am new to c++ and here is my best code so far. please make any sugestions to make it better.thanks-moot1 #include <iostream> using namespace std; ...
[5 replies] Last: That's why you've got to use [co de] code tags [/co de]. It stops th... (by andywestken)
Game board
 
Hello everyone. I need help creating a game board that is 7X6. How would I make the array so that the game board prints the way I want it to? Thanks.
[1 reply] : You need to declare a two dimensional array similar to type myArray ... (by nmcentire)
2d vectors
 
I get the following errors in trying out the example code @ (http://www.cplusplus.com/forum/general/833/. The err appeara to be at the ". "on the line that add...
[1 reply] : The error message says that the vector is an std::vector<char>. This d... (by helios)
Strange array overflow
 
hi, I was experimenting with char Arrays . Found some strange results Code:- -------------------- #include <iostream> #include <cstring> using name...
[2 replies] Last: Thanks Moschops Just after your replay I made a few changes for my ... (by Danishx83)
issue compiling
 
So im trying to do this simple program that gets 10 students and 5 grades for each. I' am pretty sure I got the main core of it down. The only thing is when I g...
[16 replies] Last: Moschops thank you so much for taking the time to help me understand t... (by SilverLake)
by moot1
whats wrong with this
 
it says the error is on the underlined piece of code #include <iostream> #include <string> using namespace std; int main(){ char question = "en...
[2 replies] Last: ok thx (by moot1)
November 2011 Pages: 1... 2829303132... 65
  Archived months: [oct2011] [dec2011]

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