You dont call a destructor. It is called automatically when a object goes out of scope or when a 'new'd object is 'delete'd.
Type: Posts; User: Raigne
You dont call a destructor. It is called automatically when a object goes out of scope or when a 'new'd object is 'delete'd.
1) you can't store "gas" or "total" in a int variable.
2) Use std::string :) Don't forget to include <string>
std::string test;
std::cout << "Enter 'gas' or 'total'\n";...
You are not assigning a value to attack.
Leviathan should be
void Leviathan( int& attack )
{ attack = 5;
}
Or
int Leviathan ( )
{
Yet your code above is not safe.
Using spaces may work in your current context, but may fail later on when you try to use it in a different project. Say for file I/O as an example.
You should...
No idea on audioLab. But direct sound is part of the directx api. Other "easier" sound libraries are irrklang, fmod, and OpenAL.
I did this same thing with a project awhile back.
My fix for the performance hit ended up requiring a rewrite of the way i was handling my ai.
I made it so lua just "defined" these behaviors. Then...
As far as books go im not really sure. but DirectX Tutorial.com - Game Programming with DirectX can get you started with the basics.
Considering your scale I would ditch the iterate through every element method, and set up a quadtree or oct-tree to cut the amount of checks you have to do each frame.
Your cat very well may, but Copy-Paste from VS2010Pro produces the garbage you see.
edit: I am not sure why, but sometimes it copies the color from VS and not formatting, and other times it copies...
I meant more like this by the list
#include <iostream>
// #include <string> I tried including this, but it didn't change things
using namespace std;
//State Abbreviations
#include <string>...
You entire problem is your comparisons are incorrects. You are trying to compare an address with a string literal.
Change your comparisons to
[code]
if ( strcmp(abb, "NC") != 1 || strcmp(abb,...
Thank you for the informative responses, and not so much for #11. It was a simple question.
This a little test case. Is the read() method the only way to achieve the correct result
void...
I am sorry I am not explaining myself well enough. I know how to get the address, I dont know how to pass it correctly to the ofstream::write() method.
It will not compile without them?
Yes, I do not need them to be any larger than 4gb. Since my projects will be in absolutely no comparison in size to World of Warcraft.
Sorry I didn't clarify my meaning of "first byte". I was...
change the extension of your zip file to a text file .txt and then you can upload.
+2 would be temporary
you could
std::cout << (number+=2) << std::endl;
note the parentheses have to be there.
This is the header from the MoPaQ or mpq file blizzard entertainment uses.
00h: char(4) Magic Indicates that the file is a MoPaQ archive. Must be ASCII "MPQ" 1Ah.
04h: int32...
I am trying to use ostream::write(), but I am not sure how to convert an integer to char* to use that method.
I know how to use std::ios::binary, but Im not exactly sure what you mean by dumping memory to disk. I may be wrong but setting binary flag only stops conversions for line endings correct?
If you...
I am thinking of creating a archive format similar to that of the MoPaQ used by blizzard entertainment, but there are a few things that I do not understand completely.
1) What is the best method...
Objects stored in STL container are already dynamically allocated. You are just adding another level of indirection
? details ?
What do you need in this text file? Random Data? Data retrieved from another source? Created with an algorithm? No details = no helpful solutions.
Provide more insight into the...
std::cin.flush()
If I remember correctly. just call flush() at the beginning of your loop.
Just a nit-pick, but many of your case statements are incorrect. 21th, 22th, 23th, 31th?