code tags are your friends
Type: Posts; User: Renegade
code tags are your friends
You may also want to try enum combined with classes.
Like
enum Food { Peanut, Jelly, Pizza, etc }
enum Hats { Blue, White, Black }
oh I get it now... I thought u didn't have to do that
I thought u could just sethp();
class User
public:
User();
~User();
yea just went back in some tuts and found that out. I learned inhertiance and some poly, and i didn't know something like that, dumb. :(
I have never had this problem before, and now i'm adding classes to my RPG, and all of the sethp,mp,etc says [Linker error] undefined reference to `User::sethp(int)' or something like that. What's...
cin.ignore may work
What are you trying to do with this code and why are you using a double dimension array to contain a string? I would help but I don't really see what is the output for this code is suppose to be.
nvm that was my fault, i just worded it terribly, i just get annoyed when some1 fixes what i say when i think it's right. But it was wrong, and I admit it. I knew what i was talking about but i...
Include is used like including a header to the project. Like
[CODE]
#include <iostream>
#include <windows.h>
#include <string>
etc.
[CODE]
I like to include all of my headers in a header...
my fault I meant Clifford.Bark(); instead of just Bark();
I'm sorry to tell you this, but that is completely wrong. =\
You have to have at least some public objects in classes, not just private and protected, and cout isn't just going to cut it... here is...
www.cplus.about.com
my fault
Here is a common way to use functions..
#include <iostream>
#include <string>
int mult(int x, int y)
{
return x * y;
There are one of many problems that you could have here, since you didn't bother to post the error. Did you add "resource.h" to your main window file, did you add "resource.h" and "windows.h" to the...
Can anyone help with a program that would allow you to enter 5 floating point values into an array called Marks and then calculate and displays the average of the marks entered?
Also need help...
It'll be hard to tell you everything you need to learn classes. It took me quite a while to learn em. goto some sites such as
www.cplusplus.com
www.cplusabout.com
ww.functionx.com
There are...
OMG, read throught the code before I post here, I've been reading that code for hours, and I made it myself, after reading tutorials all day almost. The tutorial I read said nothing about defining...
here are all of my codes
Main.CPP
#include <windows.h>
#include "resource.h"
#include "dialog.h"
const char *ClsName = "BasicApp";
I always get C:\Dev-Cpp\Makefile.win [Build Error] No 2
In compiling I get Could not make makefile C:\Dev-Cpp\Makefile.win [Build Error] No 2 I/O error
I'm using dev-c++ too, and I'm having the same problem, any help?
file i/o thats what my friend c+noob is on
i did the whole thing, and i still get the destructors and constructor errors. Maybe this is just a glitch....
lol :rolleyes:
well i got that code off of http://www.gamedev.net/reference/programming/features/mudpie1
so I guess that their wrong =\
This is the whole code on Dev-C++ right now:
#include <windows.h>
class CApp
{
public:
int Main(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow);
};