
please wait
by garygao
question with if-else statement
|
i am a C++ beginner and stuck with the following problem.What's wrong with my code and how can i write the same thing by switch statement? #include<iostrea... |
Dec 29, 2011 at 6:22pm
[4 replies] Last: Thank you very much!! (by garygao)
|
by kamisama
empty catch block
|
I've read that empty catch blocks are bad practice, but I have recently encountered a problem where one makes perfect sense. Since I am a beginner, I take this ... |
Dec 29, 2011 at 6:11pm
[3 replies] Last: One valid case I can think of right now is in destructor code. More o... (by webJose)
|
by Donanza
Problem creating load
|
I am making a new game and i am a beginner in C++ I was trying to make a load function but the problem is that i need to define the fstream in the load() too ... |
Dec 29, 2011 at 6:05pm
[2 replies] Last: How am i supposed to load the game??? It is not a variable. This is my... (by Donanza)
|
by Emmanuel11
Are they one and the same?
|
New to c++ and just started reading Arrays and strings but came across a pointer declaration that i need cleared out. what is the difference between char * c... |
Dec 29, 2011 at 5:11pm
[2 replies] Last: Consider that there is the case of char const * const myVar; = const ... (by eypros)
|
by Silvestar
why i need to subtract 48 from every digit??
|
Hi all my program works it works like this u enter some string and my program summarises all digits in entered string but i have one question why i need t... |
Dec 29, 2011 at 3:46pm
[4 replies] Last: suma+=niz -'0'; Now you don't have to ask (by ne555)
|
by sotbs
Over loading + operator to add 2 arrays and copy equal numbers once
|
#ifndef DARRAY_H #define DARRAY_H #include <iostream> #include <cassert> #include <string> using namespace std; template<class T> class DArray { T* list; i... |
Dec 29, 2011 at 1:57pm
[8 replies] Last: My advice is not to overload operator+ unless it preserves its origina... (by moorecm)
|
by newlearner
whole no. and decimal
|
im trying to put my input able to get numbers entered in whole and decimal.because i need to increment it for the next process. The problem is my cin can onl... |
Dec 29, 2011 at 1:54pm
[7 replies] Last: The printf format %d is for integers. I'm guessing 'a' is a float? (by moorecm)
|
by Ch1156
Cant read my .h file? (1,2)
|
I made a program and i made a .h file called VirtualKeys.h so that when i use a Virtual Key i wont have to define the Virtual Keys every time. There might be so... |
Dec 29, 2011 at 12:32pm
[31 replies] Last: http://www.sfml-dev.org/ It was in the article. Alternatives are ... (by hamsterman)
|
by rushab
how to do this in c++ 3.0
|
write a program in c++ to input name (first name only) and age and print the output as: if name is "jack" and age is 17, then Jack is 17 years old. please ... |
Dec 29, 2011 at 11:55am
[15 replies] Last: char name =""; That's the same as: char name ; name = '\0'; ... (by Catfish)
|
by AliSadiq
what is the problem with this program
|
I don't know why this program doesn't work my c++ shows me that there is one error. the question is (Write a program that reads in the average monthly ra... |
Dec 29, 2011 at 11:25am
[7 replies] Last: I took the trouble to indent his code... http://pastebin.com/n7eFrMhB... (by Caprico)
|
by ranjbar
problem with long double
|
hi in c++ i do : long double x=1.123456789; cout << x << endl; but this prints : x=1.12346 why? i use long double and so i expect this commands print x=... |
Dec 29, 2011 at 11:18am
[5 replies] Last: thanks (by ranjbar)
|
by jjzpgg
Error when using vector .find() member function
|
Hi all, So I have the following piece of code (truncated for clarity's sake): cout<<"Please enter the name of the app you wish to find"; cin>>AppSearch... |
Dec 29, 2011 at 10:54am
[3 replies] Last: My bad. find doesn't accept a comparison function. You need to use fin... (by hamsterman)
|
by seth23
getline error?
|
What is up with this? When I try to get the line as soon as I press a key it stops? Why is that? #include <iostream> #include <conio.h> #include <string> ... |
Dec 29, 2011 at 8:37am
[4 replies] Last: Umm getline and cin dont fit together I believe for cin which is is... (by sohguanh)
|
by Ryan Wilson
Defined operator error?
|
Here's the error I get when I run this : ====== Build started: Project: SDLProject, Configuration: Debug Win32 ====== main.cpp c:\users\aarons\doc... |
Dec 29, 2011 at 8:23am
[2 replies] Last: You are meant to make sure the tempImage != NULL after you do SDL_Load... (by Hippogriff)
|
by sch518
How can I make a timer for my simple game?
|
So I am making a small game between semesters so I don't forget everything I learned last semester. The game creates a pet and the user must feed and play with ... |
Dec 29, 2011 at 8:08am
[2 replies] Last: If you are doing it the console way, you have a problem, you most prob... (by sohguanh)
|
by Vickii
help please
|
I need a C++ function that has 4 parameters involving axis x1y1 x2y2 in the function it lets me to input (x1,y1) (x2,y2).from 1 point to the other it must be b... |
Dec 29, 2011 at 7:46am
[4 replies] Last: ciphermagi: Why have you given a link to this post itself??? Vickii: ... (by Caprico)
|
by Assassin7257
Problem with SDL
|
I'm trying to use SDL on CodeBlocks, it all worked out fine until I tried downloading the SDL Image, and everytime I try to compile something using SDL is alway... |
Dec 29, 2011 at 7:21am
[2 replies] Last: If your still having trouble I recommend you take a look at LazyFoo's ... (by Code Assassin)
|
by mj1709
a petite error.....can nyone plz? (1,2)
|
see i have a program, actually a project in which there are menus whch make u go from one page to another by means of printing & using the video memory) But aft... |
Dec 29, 2011 at 6:50am
[22 replies] Last: @computerquip so for learning purposes too we need to stick to the new... (by mj1709)
|
by ccy2059
Problem with this maze game
|
#include <iostream> #include <fstream> #include <string> using namespace std; char **path; bool **exist; int ent_a, ent_b, a, b; bool route(int x, i... |
Dec 29, 2011 at 4:56am
[no replies]
|
Another way of achieving this sum? |
Hi everybody I'm kind of new to C++ and I dont quite get this. So I have a code wich sums the values from an array and the it outputs the result while(i... |
Dec 29, 2011 at 3:47am
[3 replies] Last: You can make a class,....wait,...it might just more complicated... (by hentaiw)
|