I have a pointer that points to a class. How do I get class members through the pointer?
example:
class TestClass
{
public:
int Num;
};
Type: Posts; User: Drakon
I have a pointer that points to a class. How do I get class members through the pointer?
example:
class TestClass
{
public:
int Num;
};
Yay! Thanks.
Ah... thanks. Any easy way to overcome that?
Actually I've just tried something... nothing at all is wrong with the function Input. Somethings wrong in the main loop.
This does not work if I type in "try this" when the program runs.
...
that works, but why won't mine? It does the same thing. I don't want just the string before the space, I want both before and after(I haven't finished that part yet, its only supposed to get whats...
Sure... maybe... but thats not the problem. The problem is that it doesn't seperate them properly at the space. If I tell it to output SPACE! like so:
for(x = 0;x < strlen(Input);x++)
{...
Yes... it does do that. But thats not quite what its supposed to do. I put in "hey you", it gives me
hey
you
if I use a space. It does seem to seperate them, but I have no idea why.
If I...
This code is supposed to find a space in a character array and put the seperated string at the space into seperate strings, but doesn't quite work right... It will find any other letter except a...
First, I'll post all the relevant code..
--------------------------------------------------------------------------
#include "classes.h"
vector<BluePrint> bprint;
vector<Object> object;
...
1. sleep is undeclared identifier.
2. does it put the entire program on hold?
Using the simple iostream.h stuff like cout << "blah"; , I want to make a message appear every 350 milliseconds. How would I do that?
I was looking for something more similar to a picturebox in Visual basic.
I have a simple window that opens, stays open, and closes when you click the X... nothing more.
How would I put a picture into it, and how would I get the location of the mouse pointer in it?
string is unidentified blah blah blah...
It doesnt work... as in it recognizes strcmp, but it doesn't work...
if(strcmp(command, "quit"))
{
running = false;
}
That right?
I fail to see how a while loop would succeed where an if statement fails...
The problem is not the statement...
cin >> word;
if(word == 1)
{
Code to end loop(not shown here) goes...
Ok got that working... but how do I use it in an if statement? Right now I have something like this:
cin >> word;
if(word == "quit")
{
Code to end loop(not shown here) goes here.
}
With my console program, I use iostream.h, and therefore cin >> number. However, how would I be able to use words/characters instead of numbers with that, or would I need something aside from...
Got that working, but now I get this:
C:\TextGame\Game\engine.cpp(14) : warning C4551: function call missing argument list
Linking...
rooms.obj : error LNK2001: unresolved external symbol "int *...
I keep getting an error while compiling saying it can't find my defs.h file. In my main .cpp, I declare it like
#include "defs.h"
and this is my defs.h:
#ifndef _DEFS_H
#define _DEFS_H
...
Ok... What IS Winsock? From looking at the stuff at MSDN it's a "Windows Socket"... that helped me not.
Is there any way to do it without using winsock?
Ok, I don't even know if thats what its called... but I want to learn how to program things to work over the internet and local networks... Obviously, I'm very new to that (Although I know C++...
What determines their sizes?
Whats SizeOf?