|
Thanks very good selection
|
|
|
|
|
I think the blue Ribbon is fugly, please don't copy it.
But you should probably wait until Office 12 is released before starting to copy its UI. Look at all the poor folks that copied the beta 1 Ribbon - they now have to redo all their work because the beta 1 UI was just temporary.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Thanks, I like your comment
|
|
|
|
|
typedef string *ptrstr;<br />
const ptrstr cstr; //this is wrong
What is the type of cstr ?
What underlying type does a pointer const ptrstr represent?
Not a question, more in the form of a quiz.
They say most progammers interperate this wrong.
|
|
|
|
|
With your games you are sending real doubts down to the other page...
|
|
|
|
|
Yeah, most programmers will really "interperate", especially those who post such questions.
|
|
|
|
|
#hackC++ wrote: typedef string *ptrstr;
const ptrstr cstr; //this is wrong
What is the type of cstr ?
What underlying type does a pointer const ptrstr represent?
Somebody please ask #hackC++ to use this way to get his answer by:
std::cout << typeid(cstr).name();
Maxwell Chen
|
|
|
|
|
Looks like he has just discovered C++ for himself and it thrills him...
|
|
|
|
|
#hackC++ wrote: What is the type of cstr ?
It is a const ptrstr , but it will need to be initialized.
#hackC++ wrote: Not a question, more in the form of a quiz.
How can it not be a question if it ends with a question mark?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
my grammer and english is not what you call "good". bare with me. please.
string *const cstr;
is the correct way.
-- modified at 14:56 Tuesday 25th April, 2006
|
|
|
|
|
I think David is he not she, so he would not want to bare with you.
|
|
|
|
|
#hackC++ wrote: string *const cstr;
is the correct way.
You wanted to know what cstr was, not ptrstr . cstr is a const ptrstr , while ptrstr is a string* .
In any case, you are mistaken. While const string *cstr and string const *cstr are interchangeable, string* const cstr is completely different.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
HI all )
I included A class to my project ans when try to compile get this error :
c:\Documents and Settings\...\myprogrm.cpp(1381): fatal error C1010: unexpected end of file while looking for precompiled header directive
what can be wrong ?
thank you
-- modified at 14:15 Tuesday 25th April, 2006
|
|
|
|
|
move the #include "stdafx.h" statements in every .cpp files of your project at the top of the other includes...
|
|
|
|
|
|
What I was wondering is when i put.
const size_t array = 3;
int ca[array] = {0,1,2};
cout << ca << endl;
The program prints 0x75dfc0 (or something like that, I'm just guessing)
that output tells me nothing. Is it the memory address or what.
it all seems a little confusing.
|
|
|
|
|
#hackC++ wrote: const size_t array = 3;
int ca[array];
1. you cannot do this. you must use either macros or dynamic memory allocation.
#hackC++ wrote: cout << ca << endl;
this prints ca which is a pointer to the first int which compounds the array, so what you get is actually the address at which the array has been allocated...
if you want to print each elements in the array, iterate over it.
|
|
|
|
|
Would it be easier to use vectors in most cases?
|
|
|
|
|
#hackC++ wrote: Would it be easier to use vectors in most cases?
depends what you need to do with it.
if you need an array which size need to change often, then yes, vector is certainly a good choice.
please explain what you want to do with that array if you want me to advise you better.
|
|
|
|
|
#hackC++ wrote: const size_t array = 3;
int ca[array];
v2.0 wrote: 1. you cannot do this. you must use either macros or dynamic memory allocation.
Yes we can, because it is const.
At least my GCC compiles this code.
Maxwell Chen
|
|
|
|
|
v2.0 wrote: #hackC++ wrote:
const size_t array = 3;
int ca[array];
1. you cannot do this.
You can in C++ (not in C).
v2.0 wrote: #hackC++ wrote:
cout << ca << endl;
this prints ca which is a pointer to the first int which compounds the array, so what you get is actually the address at which the array has been allocated...
if you want to print each elements in the array, iterate over it.
'iterate' means a for-loop
|
|
|
|
|
Roland Pibinger wrote: 'iterate' means a for-loop
iterate means "go thru each element" by the way you like (for , do or while loop can do the job)...
|
|
|
|
|
mate you need an ebook about C or a tutorial about c arrays
Search in google and read it
|
|
|
|
|
i quite agree with that
|
|
|
|
|
Well i'm currently reading C++ Primer 4th Edition by Stanley Lippman.
just got done reading about vectors and went into arrays which is confusing me to say the least.
The complier I'm using is Bloodshed Dev C++. By the way, whats the best software for C++.
i'm guessing Visual Basic C++ 2003 but i could be wrong.
-- modified at 14:00 Tuesday 25th April, 2006
|
|
|
|