Beginners - February 2012 (Page 6)

by Ken777
1000 random numbers and this play the percentage of odd
 
#include <iostream> #include <ctime> using namespace std; int main () { int i,j; srand ( (unsigned)time( NULL ) ); //Display 10 random numbers f...
[11 replies] Last: I think you should check that everywhere in the code there is :: and... (by vlad from moscow)
Need a GE Template
 
Yo. I was wondering if anyone knew if there is an open source, basic template for a game engine. I'm new, so I don't know if this is the right forum, but I am a...
[no replies]
Undefined Symbol
 
I'm working on a project and I keep coming across this error. Any help would be wonderful. void Menu::read_students() { cout<<"Please input the name of...
[3 replies] Last: It's a linker issue. It does not found the definition of the studen... (by ne555)
Asterisk Pyramid Confusion
 
I'm trying to write a program that asks the user how many rows in a pyramid he/she wants and it will print a pyramid of asterisks. It is supposed to be a while...
[2 replies] Last: put your code inside [ code ] tags when posting it on the forums pleas... (by georgewashere)
Class Alias?
 
Is it possible to give a class an alias in its .h file? I thought I read somewhere this was possible, but now the reference cannot be found. If so, what is it...
[1 reply] : I think using typedef will solve your problem. (by Stupebrett)
Possible to use NEW and Initializer List on a Struct array
 
Hi all, Is it possible to use new and an initialize list on a struct array. For example in my base class i have a pointer to a struct: MyStruct* m_str...
[8 replies] Last: Thanks for the answer JLBorges, that was exactly what i was looking f... (by jmandawg)
2D array failure program
 
Hi. It's this problem for the BAC exam, and the thing is it ignores all the instructions and returns some random value. No cin>> instrunction, no nothing. #...
[1 reply] : You didn't declare the size of A , or make the function max(i,j). An ... (by whitenite1)
Return Statement
 
I'm now at the Return Statement, but the book fails at explaining it The example they give is: double CubeOf(double x) { return(x*x*x) } for (Row=1;...
[4 replies] Last: As for the "how to"... that's exactly how it works, there isn't anythi... (by Athar)
by rb485
getline alternatives
 
Bit of an open-ended question I'm afraid. I am learning C++ by following a book by Tony Jenkins. One of the exercises is to analyse a user input sequence of ...
[no replies]
by EeAA
Unsorted List ADT
 
Hello Guys: I've got this question, can someone explain...does the following main segment of code cause a semantic error if using the List Class from the Unsort...
[no replies]
function and for loops
 
I have been trying to get this program to work for a long time please assist me, I have really tried everything i know how to do and can comprehend from google ...
[4 replies] Last: Ah. Well, not much will come from it if you're trying to do both direc... (by Athar)
if statement and char arrays (1,2)
 
I am having trouble with this if statement, I know I'm missing something. { std::cout<<"Get ready for the amazingly cool game.\n"; const char cName = ...
[22 replies] Last: Ah, I thought I was defining the length of the string. You're not, t... (by Athar)
by Lio
Undefined reference
 
Why this code is giving me undefined reference to Time Thanks #ifndef TIME_H #define TIME_H // Time class definition class Time { public: Time();...
[4 replies] Last: @Moschops is not using any IDE for wiriting his programs, so you can u... (by eypros)
by Lori
Dynamic Array Issues
 
I am in a C++ class and have been assigned a program using composition and dynamic array usage. I have everything working as it should until the very end bef...
[2 replies] Last: The only work I am doing with it is when I set values to each index of... (by Lori)
pls help for my homework :((
 
write a program that will compute and display the midterm grade of a student,the midterm grade is equal to 1/3 of a minor exam and 2/3 of the midterm exam???
[2 replies] Last: First sit down and figure out how you would do it on paper with regula... (by Texan40)
Making a private vector available to other classes
 
Basically I have this class that has a member function that builds a vector of a certain struct. Example: struct Something { string something1; int som...
[4 replies] Last: > vector<Something> something; This is not a particularly good idea... (by JLBorges)
C++ programming PROJECT HELP PLS T_T
 
so we were tasked to make a basic program....(but our teacher did not discussed anything about C++ damn) we took up the JUDGING/SCORING program...the criterias ...
[2 replies] Last: Post your assignment instructions. Don't interpret, just copy and past... (by roberts)
A code to claculate the average !
 
I'm trying to answer this question on Spoj ,, It's about claculating the average of numbers witth many test cases.. This is all i could write in such code,, It...
[1 reply] : Your code is hard to read.. You declared sum=0 only at the beginning, ... (by timmyyyyy)
Problem with getting Pointers
 
Hi, I've been trying to figure out the tutorial on pointers on Page 66 of the C++ Language Tutorial(from cplusplus.com) and http://www.cplusplus.com/doc/tutori...
[1 reply] : *p1=20 //how does it give p1 the value 20 and again give 10 as ou... (by Moschops)
template namespace
 
The following questions are from a purely pedagogical view: When a class or function is created using a template and this template is such that it can be used ...
[2 replies] Last: thanks!! (by thephysicsguru)
February 2012 Pages: 1... 45678... 64
  Archived months: [jan2012] [mar2012]

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