Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
typedef to class?
MortenMacFly:
--- Quote from: blueshake on August 12, 2009, 12:07:55 pm ---yes,i think so.
--- End quote ---
What I meant was something like this, actually:
--- Code: ---struct tStruct
{
SomeClass* some_class;
int some_int;
void* some_void;
};
typedef struct tStruct tStruct;
--- End code ---
...or even:
--- Code: ---struct sStruct
{
SomeClass* some_class;
int some_int;
void* some_void;
};
typedef struct sStruct tStruct;
--- End code ---
(Notice the different name of the struct).
blueshake:
I test the codes in cc-branch version without applying the patch.
--- Code: ---class sStruct
{
SomeClass* some_class;
int some_int;
void* some_void;
};
typedef class sStruct tStruct;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
--- End code ---
it seems that the codes can not be parsed correctly.
here tStruct is recognized as a variable.
and the main is a typedef. :(
does it exist or something .
if I apply the patch , seems nothing changed :(
i will check it if i am free
[attachment deleted by admin]
MortenMacFly:
--- Quote from: blueshake on August 12, 2009, 12:43:26 pm ---I test the codes in cc-branch version without applying the patch.
it seems that the codes can not be parsed correctly.
--- End quote ---
Oops - that makes me wonder. Because the used to work...?!
ollydbg:
I'm not quite understand you guys are taking about.
For me, I think blueshake's comment is right:
--- Quote ---my confuse is if use this ,it seems that the tkTypedef will have no use any more.
--- End quote ---
We can just regard the "typedef" as a public derived class of the original type.
Something like this:
--- Code: ---class sStruct
{
SomeClass* some_class;
int some_int;
void* some_void;
};
typedef class sStruct tStruct;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
--- End code ---
We can consider tStruct is a derived class from "sStruct".
That's all my want to say.
blueshake:
--- Quote ---Oops - that makes me wonder. Because the used to work...?!
--- End quote ---
sorry! I don't know it doesn't work before.
@ollydbg
what we are talking about is codes like these can not be parsed correctly.
--- Code: ---typedef class sStruct tStruct;
--- End code ---
even i use the patch .nothing changed.
by the way . what does it mean of "Oops".
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version