hmm thanks i've tried that before but wrongly put * in new part. Now i know:)
thanks a lot
edit:It's my school project and i'm unfortunatly not allowed to use vectors.
Type: Posts; User: baniakjr
hmm thanks i've tried that before but wrongly put * in new part. Now i know:)
thanks a lot
edit:It's my school project and i'm unfortunatly not allowed to use vectors.
I have a question. Is it possible to create dynamic array of pointers?I need to create array of pointers inside of class and the array will change in size.
Normaly i would have
class player...
Edit: Thanks for help.I rearranged all includes and it's working fine now. I was also trying to use in unit class function that was using unit class element, i think that was a problem.
no i haven't got it.
I've tried to move all includes to main.h and only include main.h in all other files.
but then it come out with some other even stranger errors.
Damn and yesterday it was all...
hmm i correcteed it but i still get the same error. It looks like it didn't initialize class unit and don't recognize it... :(
My problem looks as follows. I've got two classes Unit which is a base class for infantry they're in separate files
infantry.h
#ifndef JB_INFANTRY_H_INCL
#define JB_INFANTRY_H_INCL
...
I see the point. Thats true. But still i've tried that in borland C++ builder X and when i tried to enumerat lik this
enum TerrainType
{
Plains=0,
Forest = 0,
Hills = -42,
Swamp =...
Hmmm.Ok i'll use int. Funny thing is that borland C++ builder X is compiling it and C++ builder 6 not. I've also found somebooks and tutorial that says it's correct code.That's why i'm puzzeld.
I've writen some program in borland C++ builder X the want to compile it in builder 6 and VS C++ 2005 and i've got such problem in both compilers i get such error
"error C2676: binary '++' :...
Thanks.You're my hero.I was begining to warry that i'll have to change whol writing reading process. But now it works. Hmmm fun thing is that i was looking on openmodes but didn't manage to find...
i've got another problem hope that's the last one. I've been searching and trying diffrent think but i don't know what to do.
I've got some array of classes stored in file
void Newmap(char...
Thanks.Hmm such an obvious mistake.
i've got such problem.I have enumeration declared in main.h header file and i wont to use it in files name.cpp ans name.h wich have definition and declaration of class name. And when i'm using...
Hmmm.thanks that sounds just fine.At the begining i was worry about not taking under consideration the size of Mapsqr when using seekg().Thanks a lot.I'll try it when i'll have some time :)
Ok i've got some problem.I have function that saves array of class objects to a file using write function from fstream.h
#include<iostream.h>
#include<fstream.h>
#include"Mapsqr.h"
void...
thanks a lot.Your help was most usefull.Now everything works fine.finaly i used mem allocation and for loop.
Thanks for answers.They're quit helpfull.Now i know that i always pass a pointer not an array to function and that i have to make a copy to distinguish them.
And my second question is.Are there...
My problem looks like that i have class wich have some array and i need to pass it somwhere alse. How to do it? I've tried passing pointer but then when i modify array i get i also modify one in...
I didn't count on such quick replay,thanks.
Thanks for link to tutorial i've already start reading it.
I know windows programing is not easy but i just want to give a try.I've got some basics(i...
Ok i'm my knowleg of c++ is not to big... enough to write simple consol programs. I need help with program that are a normal window in windows(damn,maybe someone will understand that:)my english is...
I want to write simple game(consol application) and i would like to make some graphic (color squers nothing complicated). Someone told me about graphics.h library,but now i know it's for borland...