Beginners - March 2012 (Page 41)

by arooj
Parallel Arrays help
 
A teacher uses the following table for grades: Min Grade Max 0 F 299 300 D 349 350 C 399 400 B 449 450 A 500 ...
[6 replies] Last: CJC0117's answers helped me make the program work, thank you all for h... (by arooj)
by Lio
Operator overload () ,confusion
 
Hi ,I am a little confuse about this const(what exactly mean) Where to use it and when int operator()(int i)const { return i+5; }
[3 replies] Last: [quote=Vince59]Was this a trick question? No, the position const in... (by closed account zb0S216C)
2 times Operator Overloading
 
Hey guys! Sorry for my rather broken english beforehand, I hope no one minds. My problem is following: I have coded a class which allows me to resize my arra...
[9 replies] Last: I understand. Thank you for your support, I appreciate your and Peters... (by Himzo Tahic)
Compiling gives expected primary-expression before âfoutâ
 
Hey guys, brand new here, and brand new to C++. Trying to get through my homework and I keep getting a few errors when I compile: hw9.cpp: In function âi...
[11 replies] Last: Hi Jade, Your problem is because you are using cin >> (line 25) and... (by ReedTompkins)
Void: Execution problems
 
I'm not new to C++, but i figured this would be the proper forum to ask a question like this in. I have not used functions declared as void until now because i...
[6 replies] Last: I tryed your suggestion. It worked! Very nice sir. I decided to cre... (by IWishIKnew)
read/write problem
 
Hello guys i have to do a code with a class of 3 different fields of any data type,and 2 constructors(one default and one with the parameters )after that progra...
[1 reply] : Review all of your previous lessons. Particularly any dealing with st... (by cire)
by pzling
Monostate Data Members
 
Hi I'm doing an exercise to convert an existing Factory Pattern implemented with the Singleton Pattern into a Factory Pattern implemented with the Monostate ...
[8 replies] Last: ahhh thank you all for your help. that makes a lot more sense now! (by pzling)
by dlusis
Writing a Function
 
I am really struggling with how to write functions. If someone could show me how to solve this that would be awesome. Royal Oak University is undertaking a ...
[1 reply] : I have not tested the code but the idea I have used is correct. int ... (by vlad from moscow)
by EeAA
class stack
 
I have the code for a class stack. How can I test it? what do I need to put in main? // stackADT.h #include <iostream> #pragma once using namespace std;...
[8 replies] Last: thank you guys:) (by EeAA)
for, dowhile, and while problem.
 
so essentially i made a program that allows that use to convert any number from base n to base 10. im soley using base 5 in this instance. the issue is, is that...
[9 replies] Last: ok im stuck. can anyone help me? nevermind, ill just go with the if st... (by cocopuff)
patterns? say what?!
 
i have to create program that prints a pattern of "-" and "*" using a for loop and a boolean flag. this is my first programming assignment and it is really co...
[2 replies] Last: Have you used a loop before? Post what you've got. (by clanmjc)
moving the value of an int
 
How can i move the value of an integer from a block within a block to the outer block. ex. total = 1 if (int1 <= int2) { cout<< int2; ...
[1 reply] : Uh, it should work. Total is not declared inside the block. I'm guessi... (by ResidentBiscuit)
trying to run a series of ifs
 
hidy ho all. I'm having a little trouble with a program I'm writing for school. Before we go any further, I'm not looking for easy answers or someone to write...
[6 replies] Last: awesome. thanks all! (by mattig89ch)
Quick snake algorithm?
 
When making a snake game how could I make sure that the snake body follows the head? So far my algorithm put my snake body in an struct array that stores the...
[6 replies] Last: struct SSnake_body { int i_X; int i_Y; SSnake_body * next; //don't k... (by Shinigami)
by capei
Reference/Pointer Question
 
Hello, I have the following program: #include <iostream> using namespace std; void foo(int, int&, int, int *); int main(){ int x = 5, y = 10, ...
[3 replies] Last: Thanks so much for the reply's and the well-drawn out diagram! It was ... (by capei)
Questions Again
 
Write a function in C++ which accepts a 2D array of integers and its size as arguments and displays the elements which lie on diagonals. 2 [Assuming the 2D Ar...
[3 replies] Last: #include <iostream> using std::cout; using std::endl; int main() ... (by Texan40)
Making a c++ program that starts up when the computer does
 
So my question is: How would I make a c++ program that starts up when the user logs in to their account and views the desktop? Such as how MSN starts up automa...
[1 reply] : Right click the .exe in your debug folder, and make a shortcut. Cut an... (by NerdTastic)
WHAT IS OVERLOADING AN OPERATOR?
 
Can somebody explain to me what overloading an operator is, and what purpose does it serve? I've red about overloading operators for objects (e.g +, -, >>, << e...
[2 replies] Last: Overloading an operator means changing the way the compiler uses an op... (by closed account zb0S216C)
by Fridge
Help on a programme.
 
Hey I help on a program :) I've just started programming and i'm trying to create a Rock paper scissors program. I've already made the pseudocode for it. If any...
[4 replies] Last: In all reality the only difference is code cleanup, it's not like your... (by NerdTastic)
Including pointers in functions
 
I was asked to write a c++ function which determines the roots of a quadratic equation. The use of pointers in the function was a requirement and I've written t...
[4 replies] Last: Thank you guys so much! (by acblind)
March 2012 Pages: 1... 3940414243... 71
  Archived months: [feb2012] [apr2012]

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