Beginners - April 2009 (Page 3)

by lotios
Classes
 
I am having trouble with classes. When I run this through the compiler, It says "unqualified-id before '{' token" on line 8. What's wrong? #include <iostrea...
[4 replies] Last: 3 simple errors in your code that I see are: a) you cannot initialize... (by kevinchkin)
finding average?
 
// stand alone project // finding an average from three numbers #include <iostream> #include <string> using std::cout; using std::cin; using std::endl...
[8 replies] Last: -masiht, i found your mistake here cout << "average"; no quotation... (by masiht)
by MatieA
IF Else Problem
 
Hi all, I wrote this code for class, and everything works EXCEPT my if else statements. If someone could point me in the direction of my error(s) I wou...
[8 replies] Last: Thank You Thank You!!! Sometimes the obvious eludes me.... ;) (by MatieA)
logical operators and loops
 
im trying to write a program using the rand() function the computer has to guess the number 30 for the loop to end...can anyone help???? this is what i have so ...
[4 replies] Last: that makes perfect sence thank you sir. (by anythingworks1)
by Cero
Making an object move?
 
Hi, Right now, I'm trying make an object move. Let say I'm trying to print a box or a circle, what commands should I use in order to make it move? Like shou...
[5 replies] Last: hmm..so it should move on timer.. lets say you have a timer function. ... (by writetonsharma)
sorting a date array
 
I'm currently attempting to sort a two dimensional array of dates. char dateAdded the data looks like 04/06/2008 this means i need to tear this char ...
[7 replies] Last: yes i understand what your saying. I haven't seen this memcpy() functi... (by engrob10)
by Peyton
Vector size() function
 
Hi there, Say I have a 2D vector of size 3:4 as follows: vector< vector<double> > data( 3, vector<double>(4) ); How would I then use te size() functi...
[2 replies] Last: Thanks Bazzy, it works. I had to change int to size_t to prevent a war... (by Peyton)
Macros & INT type
 
32,767 || RAND_MAX. sence 32,767 is defined as "short int," is it possible to generate a random number using a different Int? like the type "unsigned int?
[2 replies] Last: This is what I do when I want 32 random bits and don't feel like using... (by helios)
templates and generics
 
why is there a need for both templates and generics whe both them are almost the same. i know the differences and the constraints of generics but why need both ...
[4 replies] Last: Generics are a C# construct and templates are a C++ construct. While ... (by jRaskell)
by ZoRz
Troubleshooting Code - not compiling
 
Hey guys, new to the forum and C on the whole. Have a project and I'm running into some problems which I dunno know how to get around. Can someone please review...
[1 reply] : There are quite a few errors. The two that pop out immediately to me ... (by jdd)
by yComms
MouseMove and Time outs (Using Gwin)
 
Hi, I am new to this forum. I've done some research but couldn't find an answer. I want to write a program that enable users to move small images around (...
[no replies]
by murva
loop inside const function
 
I am tryng to run a loop inside a member function: double Polynom::valueAt (double dValue) const { result=0; for (i=0;i<deg+2;i++) { result=result+(...
[3 replies] Last: Yes, right, result and i are data members. I declared another varaible... (by murva)
C++ and XML
 
Is it possible to use C++ to get data from an XML file? I'm just starting out how to do XML (which is fairly simplistic and self-explanatory) and I thought t...
[2 replies] Last: you can use xerces or expat c++ xml library. i will go for xerces. (by writetonsharma)
suggested manual?
 
im using Begginning C++ game programming by Michael dawson as a starter Manual to learn C++. It just seems like its moving to fast, and in the absence of explai...
[no replies]
by tjinx
Drawing for PPM
 
What I need to do is write a program which can read in a data file, process the data, and create and write a PPM file for the corresponding image.The menu (wit...
[1 reply] : AND.. point.cpp #include <iostream> #include "Point.h" using ... (by tjinx)
by tjinx
Building Basic Classes
 
I need to write a code that perfoms all the main operations (+ - * /) on inputed fractions. I need to do this using a class. I can't get it to run. This is the ...
[1 reply] : The error message says quite clearly. You're trying to access private ... (by helios)
by Joe101
stack inside class problem
 
Hi, Below is the header file a Palindrome class that I'm writing. Could someone please tell me what syntax I need to employ to be able to include and use a sta...
[2 replies] Last: thanks so much! (by Joe101)
Finding the Lowest and Largest Numbers
 
Alright, here is the problem Write a program with a loop that lets the user enter a series of integers. The user should enter -99 to signal the end of the s...
[no replies]
what's wrong with the following codes?
 
i typed a small fragment of codes from C++ primer p.19, but can't get the expected result. what's wrong with these codes, or my compiler (Dev-C++ 4.9.9.2)? -...
[4 replies] Last: Thank you, beginner101. inserting system("pause") before return 0 wor... (by cplusplusnew)
Void Functions
 
Hey Guys can someone please explain the purpose of void functions, how to use them and when is the best time to apply void functions. Thanks Guys
[5 replies] Last: quote from computerquip: void aFunction(int &myInt) { myInt... (by Disch)
April 2009 Pages: 12345... 28
  Archived months: [mar2009] [may2009]

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