Beginners - October 2009

Character Restriction
 
How can I restrict the user to input characters for e.g. if I ask them for a number?
[3 replies] Last: You need to #include<string> If you are not using namespace std; ... (by Bazzy)
by raz
c++ homework
 
hello all plz help me with this homework. consider the definition of the following class: class CC { public : CC (); //line 1 CC ...
[10 replies] Last: thx all (by raz)
Class Date
 
Hello every body i have to understand this code but i understand it, can you explain my line by line please? class Date{ public: Date(int inDay, int inM...
[2 replies] Last: thank you Bazzy very much! (by fleur1990)
by craneJ
im working on a switch statement and it wont work for me
 
Im tryn to get this switch statement to work, so that it will display a different message depending on the letter input. i get the program to run and it says "E...
[1 reply] : #include <iostream> using namespace std; int main() { char ch; ... (by mcleano)
For Loop
 
int a = 5; for (int ctr = 0; ctr < 4; ctr++) a = a - 1;//1 a = a + 3;//2 cout << a << endl; I need to know whether you need to evaluate b...
[2 replies] Last: Ok, I think I know why the ans is 4 now. Tks. (by makan007)
Program executing although answer is NO?
 
Hello I`m trying to make a simple program to enter info about TVSeries (doesn`t save anything anywhere, just did it for fun) So, I have the user confirm at a c...
[2 replies] Last: Thank you :) (by BloodMetal)
unknown crit error
 
Hi i am busy with a project ATM, and i get a crit error at a certain place all the time, it is marked in the source code main.cpp #include "Driver.h" ...
[2 replies] Last: part2 driver.cpp void addRecord() { int x = 3; /... (by SoetSout)
return string array
 
hi people, im trying to return an array. here is my function. string *split(){ string *ptr; string data ; ptr = data; data = "apple"; data = "...
[3 replies] Last: hey people, i managed to resolve it. tks anw (by nuttynibbles)
by rihab
printing program
 
hello everyone I am working in a biomedical department in a hospital and they have to test each device in the hospital in a specific date that due to the devi...
[2 replies] Last: thanks PanGalactic for the reply... but for sure no one is perfect an... (by rihab)
My Guessing Game, you can't ever win?
 
I tried multiple times to win, but I can't! Is it just me or is my program flawed? Also I have a char variable named answer to ask if a user wants to play a gam...
[9 replies] Last: Programming requires you to think like a programmer. A programmer is a... (by gcampton)
pseudo random numbers, not random?
 
Hello pplz..., was just wonderin' if anyone can help me with a problem I am haffing.... I was just tryin' to do a simbple program that asks if you want to fire,...
[4 replies] Last: This won't help you any, but it is a valid response to your message ti... (by Duthomhas)
by jimctu
Measuring execution time
 
I need to measure the execution time of my programs... any one knows an easy way to do that in C?
[6 replies] Last: thx (by jimctu)
simple programe
 
hay guys i have hw assignment to make a programe which will take a number and print it line wise at screen ..for example if i give 3121 then it will print 3 1...
[5 replies] Last: I think your professor wants you to play with the division / and rem... (by Duthomhas)
C++ to HTML file
 
Disclosure: This is a HW assignment. I am working on a calendar homework assignment where we are to create a calender for a specific month. This calender nee...
[2 replies] Last: You need to learn how HTML files are organized. Here's a good tutorial... (by Duthomhas)
functions not working.
 
Hello. I'm working on a simple game. I know this isn't advanced, or proper way to do this, but I'm just learning functions. That's where I need the help. Could ...
[7 replies] Last: Thank Bazzy, works fine , and it should have been obviouse to me that ... (by pressence)
array of strings?
 
hi, i was making a tic tac toe game with an array of strings. but every time i compiled the program to see if it would display the strings it crashed. is there ...
[2 replies] Last: It's just like any other array of objects, assuming that you are using... (by kempofighter)
how to convert hex to string?
 
hi all is there anyone who can tell me how to convert hex to string with cpp code? tks
[3 replies] Last: So you want to convert a hex number to a string representing that numb... (by Bazzy)
Function problem with triangles.
 
Help would definitely be appreciated! The problem is: Three numbers are sides of a triangle if all numbers are positive and the sum of any two sides is longe...
[7 replies] Last: So with those else statements, it should be else return false. And... (by Joliedoll)
Euro symbol
 
So, I'm doing a basic USD to Euro converter for my class, and its all easy-peasy so I'm adding a little bit of flair. How do I put the Euro symbol in for a cons...
[4 replies] Last: BTW, if you want good marks, I would avoid all the bitty-kiddie talk a... (by Duthomhas)
Problem overloading the addition operator
 
Pls i'v problems overloading the addition(+) & subtraction(-) operators as i did the multiplication & division operators by declaring them as friend functions w...
[1 reply] : You are missing a semicolon after the class closing brace, a typo in ... (by Bazzy)
October 2009 Pages: 123... 25
  Archived months: [sep2009] [nov2009]

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