Beginners - March 2012 (Page 5)

Can I use <= or >= in Switch loops?
 
Hello I'm trying to make a simple switch loop that if the number is less than 100 then it does something and if it is more than 100 it does something else. My c...
[1 reply] : Not as far as I'm aware. An if statement would be better in this sit... (by MrHutch)
classes and constructors assignment
 
I am totally lost on this now, I have been trying to do it for 3 days now but am totally failing at it. There are a lot of details, so on the off chance someone...
[3 replies] Last: Constructor The constructor should accept the car’s year and make a... (by MrHutch)
Help with Max value in array
 
I am new with C++ and I create a simple program for my HW. I have problem with Max value from array, can you help me? #include <iostream> #include <cmath>...
[3 replies] Last: Anyone can help me? With this?? To display Max value like: The large... (by arcadiN)
I need help with a text output
 
I need to make column titles but they are multiple lines for example: Height starting in weight inches in lbs I kn...
[2 replies] Last: Thanks, I ended up just doing something along the lines of cout << s... (by aSoccerFreak)
While Loop Error
 
My problem is that when someone inputs the length of three sides of a triangle and they do not produce a triangle the while loop asks for input again, but when ...
[12 replies] Last: The solution is to do all of the input validation before calling area_... (by cire)
Help pleas
 
trying to code this The No Interest Credit Company provides zero-interest loans to customers. (It makes a profit by selling advertising space in its monthly s...
[1 reply] : and its not printing out my output The reason for this is the ; after... (by coder777)
by KaeM
Linked list with random numbers inside
 
Hello, I'm new here and I would like to know about how to make a linked list with random numbers inside it. I know how to make the nodes, but I'm confused on h...
[2 replies] Last: If your list is anything like the standard C++ linked list, it has a ... (by Cubbi)
C++ Need help urgent!
 
Im getting C++ forbids comparison between pointer and integer errors and a function-definition is not allowed here before ‘{’ token #include <iostream...
[1 reply] : On line 26 and elsewhere, you are comparing a function name to a chara... (by Zhuge)
Do-While Loop Problem?
 
#include <iostream> #include <iomanip> using namespace std; void main() { cout << endl; cout << setw(34)<<"Weekly Payroll Report \n"; cout << "----------...
[2 replies] Last: The reason it doesn't stop right there is because a do loop is require... (by paulthepenguin)
A function definition is not allowed here before {?
 
#include <iostream> #include <cstdlib> using namespace std; // Prototypes int fibonacci(int); int factorial(int); void printMenu(); int getMenuChoic...
[1 reply] : Indent your code and you should see the problem much more easily. (by firedraco)
string conversion problem in big number class
 
I am trying to create a "BigNum" class that will handle numbers greater than 32 bits for problems on projecteuler.net. Here is the implementation file: BigN...
[7 replies] Last: I used both your suggestions, thanks for the help. The problem turned... (by neros1x)
Find the longest in a linked list recursively
 
string List::Longest(Node* Current) throw (EmptyList) { else if (Head != NULL) sizestring = Head->Data; while(Current->Next != NULL) ...
[1 reply] : Can someone please help me with this. I'd really appreciate it. (by thechad90000)
Link 2005 Error
 
I am using VC++ 2010 Express. I wrote a program that runs correctly. I am writing a follow up program in the same project . That second program won't com...
[2 replies] Last: LB, Thank you for your very informative reply. Your example is a lit... (by nathan10)
Graphics?
 
Hello, I've just started using c++ and I'd like to draw some shapes to a canvas. Which is the best way to do this? I've used Java to do this before, it was ver...
[3 replies] Last: OpenGL (by ResidentBiscuit)
convert a string position to int?
 
Hey guys, I'm encountering a problem when trying to convert a specific index of a string (like s1 ) to an int. After some searching I found methods such as ...
[2 replies] Last: thanks a lot! I got it to work now! (by DecemberStorm)
Please Help. Completely Stuck Right Now!
 
I have a project for school where we have to create a menu for the user, then have the user select their item and loop the menu until the user types a certain c...
[2 replies] Last: The only problem is I cant use arrays because we havent learned them y... (by cbcarpenter123)
do loops?
 
ok so basically i want to know if i will ever use do loops? what are they usefull for and am i going to need them? And should i learn them.
[2 replies] Last: do...while() loops are used to ensure that the statements within the... (by closed account zb0S216C)
by skwh
Display length of a double?
 
So I got my last program working, and when I calculate with a double my program only shows a Pi estimation to 6 digits. double estimatorD(int dg) { int dgt...
[7 replies] Last: ok. I'm sorry. I'm better at java. (by skwh)
self terminating program
 
Hey guys, we recently covered file I/O in class and i was wondering if there was a way for a program to delete its self during or after execution? I'm not...
[no replies]
GUI for beginners
 
Hi, I have to write a two player chess game for school and if my partner and I implement GUI , we will get extra credit. I was looking into allegro and .NET and...
[8 replies] Last: Thank you very much for the responses! (by dheredhere)
March 2012 Pages: 1... 34567... 71
  Archived months: [feb2012] [apr2012]

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