I'm quite sure STL strings are null terminated. The c_str() function just returns a pointer to the first character and thus the string must be null terminated.
Type: Posts; User: gliptic
I'm quite sure STL strings are null terminated. The c_str() function just returns a pointer to the first character and thus the string must be null terminated.
128-bit? What do you mean?
I didn't actually get that.
Anyway, this is homework.
You mean memset, right? memcopy copies memory.
Then I suggest you learn how classes works. You should know the ?: operator if you know C++.
I almost never writes console apps, but when I do, I run them from the VC++ IDE and it automatically keeps the window open until a key is pressed.
I think the 'pause' command is better:
#include <cstdlib>
system("pause");
It overwrites all mp3s with it's own source. You can't exactly play them after that!
He just needed to know how to pass 2D arrays to a function. I showed him that.
Allocating stuff on the stack disregarding how much or how many just takes max one clock cycle on Intel's processors and it generates much smaller code (3 bytes compared to the new operator calls and...
If you have a 2D array:
char tiles[3][3];
Then you can have a function which recieves the tile:
void TileFunc(char [][3] _tiles)
{
_tiles[0][0] = 0;
}
-20 as an unsigned byte is (256-20) = 236. 236 is one of the extended characters: . Cool! It's the infinite symbol!
(EDIT) Ohh, it converted to Unicode. Crap (/EDIT)
I believe the '-' sign shouldn't be there, right?
char a = 20; //a now contains 20
cout << a; //This will print out the character
NULL is exactly the same as 0. It's not a command.
In that case, why don't simply pass the variables to the next function?
Remember that you must write '\\' instead of '\'.
...if you don't cast it.
What are you talking about? There aren't any restrictions for const-types except that they cannot be changed.
You can do that but I don't remember how.
It's not so strange since you are writing out the address of the lottoNums array.
If you do like float^integer then you can use my method for faster code (between 32 and 64 multiplies for a 32-bit exponent). Here it is:
float powfl(float b, unsigned long x)
{
unsigned...
You are using GCC and you'll have to specify -fvtable-thunks to compile code that uses COM in GCC.
I think you understood me wrong. There isn't any way of inputing escape sequences using scanf(). You have to input them as strings and interpret them yourself.
You do exactly the same as you do when you add decimals. Just think about it...
Unfortunatly, you have to work it out yourself.