General C++ Programming - December 2011 (Page 24)

Moving a Character
 
I would like some help. I am trying to make a simple board game in hope of making a better RPG of some sort; but working my skill level up. If any of you are...
[1 reply] : Take a look at this post. http://www.cplusplus.com/forum/general/57350... (by Mats)
by Gldnbr
Clearing text output file
 
I have a program that reads and stores information, however, when you store information, it just overwrites what it had before, so some of the previous informat...
[5 replies] Last: Okay, I removed the file checking and changed the while loop back to f... (by Gldnbr)
array problems
 
im trying to create an array that sorts the input numbers in increasing order. the problem i am having is shifting the array to make room for the new number. if...
[7 replies] Last: thanks so much. we never learned list so i have to use arrays. thanks ... (by kjmapr26)
would this define work?
 
#define <C:\Documents and Settings\Josh\My Documents\My Music> if this does work how would i make one of the sounds play i just know how to open it lol. a...
[1 reply] : well i guese it might be define errrrg "C:\Documents and Settings\Jo... (by joshrocks)
Opening an .exe, then keystroke
 
Ok, I may be in over my head but my work asked me to try, I asked them to pay me, and they said ok...so here I am. Mind you I only have 1.5 years of programing ...
[2 replies] Last: Ignore above. Allegro is nice to have, but it's overkill if you just w... (by hanst99)
Blackjack program?
 
The problem has been solved!
[3 replies] Last: Don't sweat it, we all do that every now and then. (by hanst99)
convert the time sec to HH:MM:SS
 
hi I need to convert the time given in seconds (time_target) for 3 variables (hour, min, sec) I have a problem with the second of the program's output. I w...
[3 replies] Last: Thank you for quick reply, now saw the error of calculation. time_targ... (by loop2012)
by amma
Factory Question
 
Hello All, Say you have a class Shape with subclasses Circle and Rectangle. I have created a Static Factory which works fine to instantiate a class of Cir...
[2 replies] Last: Ok thank you (by amma)
cout format floating point
 
i like to know how to config my cout with manipulators so i can print double like this double x=1.0 double y=1.2 double z=1.2222 cout<<x<<endl; cout<<...
[1 reply] : You can use setprecision, fixed, setw, etc. Read this http://www.cplus... (by tfityo)
How to allocate more memory for an array
 
I understand vectors do it for you, but as a learning experience, how would I allocate more memory for an array? For example: myClass * classArray = new myCl...
[12 replies] Last: I'm sorry bluecoder, I don't understand what you mean by saying: ... (by TAZO)
by cobalt
operator [] in 2d array
 
Hello, i've been searching for any hints for my problem for two days. I've noticed some usefull ones, but unfortunately i still don't get it. The problem seem...
[7 replies] Last: Thank u all for your help! now, it all works fine for: class Matrix... (by cobalt)
by kostis
Help with error C2504
 
Hello guys, I am getting a compile error: "...\polygon.h(13): error C2504: 'node' : base class undefined" #ifndef _NODE_H_ #define _NODE_H_ #include <iost...
[2 replies] Last: After including the node.h into polygon.h I am getting some new errors... (by kostis)
C++ Simple Problem
 
Hello Dear Experts, I am stuck with my program and I am a complete newbie to programming. Consider I have a function func1 that takes 2 parameters alpha and...
[2 replies] Last: ¿so what is the problem? It seems that you figured out. cin >> how_m... (by ne555)
method of base class return pointer to derived class?
 
I have a base class (let's say "Base") with a method returning a pointer to this class (let's say "Base *Base::Method (void)"). Then I also have a class derived...
[1 reply] : class Derived: public Base{ public: Derived* method(); } ... (by ne555)
by Smoke
Overloaded input operator recognized in Windows but not Ubuntu
 
This has to be the oddest error I have ever come across. My overloaded input is recognized in windows but Ubuntu provides this error. no match for the operat...
[4 replies] Last: As request, please see below #ifndef FILEHANDLER_H #define FILEHAND... (by Smoke)
by Khawar
converting string to const char *
 
Hello, I have three questions. 1 ) Say I have a string variable with three dates string myDates = {"11/12/2010","11/13/2010","11/14/2010"}; How do ...
[5 replies] Last: You've got to delete what you newed. dates = new char[myDate .lengt... (by ne555)
list based on array
 
guys, how to create a list using array and then you can insert, delete, find and display item in the list. tnx in advnce
[1 reply] : You write a list class that uses an array internally, and then provide... (by hanst99)
number representation console vs autos
 
Coud someone explain it in clear and easy way why when I write code like this double * ds=new double ; ds =1.0; ds =2.34; std::cout<<std::endl<<std::setpre...
[2 replies] Last: you can use precision(int)to set te # of digits showed after point, ex... (by Vins3Xtreme)
by swinny
Having some problems with input
 
im using a user-inputeed int to send into a switch statement in a menu system that i am using. however if the user enters a string or char by accident my progra...
[1 reply] : you can use a 'string' variable that is used to get the inputfrom user... (by Vins3Xtreme)
@ Arrays and fstream question. Urgent@
 
Hello, everyone. I am a newbie in C++. I meet some problem in C++. I am get stuck in a program about the question and what it looking for: https://plus.goog...
[3 replies] Last: I can guide you, but I won't do that homework for you. Show the code ... (by coder777)
December 2011 Pages: 1... 2223242526... 39
  Archived months: [nov2011] [jan2012]

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