General C++ Programming - February 2013 (Page 22)

Vector of pointers
 
I have a class, User , with a member string name; . In main() , I declare vector<User*> userList; and add a few pointers to User objects with userList.pus...
[5 replies] Last: I found a working solution to taking in input and splitting it into st... (by closed account DEUX92yv)
Multi-dimensional arrays of objects
 
Hey guys i want to make a two-dimensional array that is consisted by objects but i dont want to initialize the objects when i make the array.. i just want t...
[2 replies] Last: oh.. i forgot to say that is forbidden for my project to use STL libr... (by Prmaker)
Overriding Inherited Virtual Functions
 
Is it possible to do something like this: class A //parent { public: virtual void DoSomething() = 0; }; class B : public A //child { pu...
[4 replies] Last: Thanks, my knowledge in this area is pretty shaky. (by martianxx)
command prompt from C++ program
 
Hi, I am facing a problem in C++,I want to execute a command in Command prompt from a specific path.I am able o select a path and execute cmd.exe using the ...
[4 replies] Last: thanks for the reply. actually i want to execute a query " bpl -p ....... (by tonythomas88)
global variable
 
char **TT; TT = "adducts"; TT = "adduct"; TT = "closes"; TT = "close"; TT = "compresses"; TT = "compress"; TT = "depresses"; TT = "depress"; T...
[9 replies] Last: What is *TT ? If you mean the definition showed by Peter87 then you c... (by vlad from moscow)
error:inherited member is not allowed
 
this is my header file #ifndef Header_H #define Header_H #include <iostream> #include <string> using namespace std; class CurrentAccount{ private: ...
[4 replies] Last: One more silly code void CurrentAccount::setOverdraftLimit(double ov... (by vlad from moscow)
by sis007
Iterator
 
Hi everyone, So I was assigned to write a link list program by declaring list<string>myList also using iterate class (STL). I think I don't understand what i...
[1 reply] : > Do i need to create a separate header file for that? No. Just use t... (by JLBorges)
GAME ENGINE ASAP
 
Hello, i have recently made a small team for game developing (just like 6 of us, (me and my friends)) and we were trying to figure out a good game engine to be ...
[no replies]
LNK2019 Error
 
Hey guys when I try to build this program I am getting an LNK2019 error, the full error is: MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symb...
[2 replies] Last: that's weird I do that for every program I write, at least for school,... (by cfearon9)
Anyone help me out!!!
 
Program 1. Design a program that reads in a text file with drawing commands and then outputs a bitmap with all the items drawn correctly 2. BitmapFile.h and B...
[1 reply] : What have you written so far? What are you stuck on? (by LB)
by cob
Item Storage
 
So the RPG I have been making is based on this tutorial http://www.penguinprogrammer.co.uk/c-rpg-tutorial/items-and-collectables I don't entirely underst...
[2 replies] Last: what do you mean by a structure? Like a class or a function? I'm not s... (by cob)
Do I have to use a switch statement for this PLEASE HELP
 
Anyone know how to code this without the switch statement? switch(count) { case 0:teens = (numberArray ); teensToWords(teens, count...
[3 replies] Last: Didn't think about that Velnais but yea your right although it might b... (by Elidor)
How does one being writing a device driver for a piece of hardware?
 
I mean from an operating system independent rule here. Say I decide to write a device driver in C/C++ right now for, let's say, an Intel GMA video card. W...
[2 replies] Last: [quote=Lying Cataract]" Do I study the specifications? " That would b... (by closed account zb0S216C)
Problem With Struct Constructor and Abstract Class
 
Hi, I need a little help spotting an error in my code. I am making a snake game just to give some context. //LevelObject.hpp class LevelObject { p...
[2 replies] Last: Thanks (by martianxx)
by xzki
While Loop Help?!
 
Cheers guys - edited it to while(!name()) and it worked a treat!
[6 replies] Last: yeah sorry about that typo (by martianxx)
Passing an object into a function
 
Hey there, I have an issue with a some code: This is supposed to check for valid input if(((c.integer < 0)&&(c.numerator < 0))||(c.denominator<=0)) { c.in...
[4 replies] Last: I think that you defined two functions (or maybe post your full code):... (by tfityo)
by Stono
Another Unhandled Exception Error
 
Hi im trying to make a sudoku game... What I want to do is make a Sudoku game that will be able to read from a file and fill the vector< vector<int> > re...
[4 replies] Last: The value is set In the constructor FileHandler::FileHandler(char* ... (by Stono)
If's and Chars - Help
 
Hey guys, i'm having some trouble using chars with if's. I have used const chars but they are really irritating because I need to change the char later on in th...
[4 replies] Last: Thanks heaps man :D Legend (by kingpulse)
by ET21
Displaying Averages in a Table
 
I've finally been able to get my coding corrected after doing this for 5 hours and watching numerous tutorials on it... But I now need assistance to create a ta...
[2 replies] Last: This is the quiz instructions Quizzes are next. Ask the user to enter ... (by ET21)
C++ Compiles One File, but Runs Another File
 
Hi everyone, I tried running an example from the C++ tutorials on structures (subsection "Pointers to Structures") and it appears to compile fine, but when ...
[1 reply] : Remove the previous source file (Pointers.cpp) from your project and a... (by cire)
February 2013 Pages: 1... 2021222324... 43
  Archived months: [jan2013] [mar2013]

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