![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
Omg!
What is right with this piece of code!
class CustomizeDialog :
public nContainerWindow
{
nStatic LabelNick;
nStatic LabelQutMessage;
nEdit TextNick;
nEdit TextQuitMessage;
nTickBox CheckRecordNoIncChat;
nTickBox CheckRecordAll;
nStatic LabelRecording;
nTickBox CheckRecNoIncUserInfo;
nStatic LabelGameplay;
nComboBox CmbGameMode;
nButton ButtionDone;
nButton ButtonAdvanced;
class SW_SpecialLabel : public nStatic {
void initialize();
} SpecialLabel;
public:
void on_initialize();
};
__________________
Spread your wings and fly! Chicken! |
|
|
|
|
|
#2 |
|
Professional Programmer
|
I'm assuming you mean what is wrong. And I think it's the semicolon at the very end after the parentheses. Unless I'm mistaken.
__________________
Perhaps I should have a sticky topic for all of the times I "return" to this forum instead of a new one every time. |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3
![]() |
There is nothing wrong with that code at all. The following compiles fine with GCC 4.1 and all warnings cranked up.
cpp Syntax (Toggle Plain Text)
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
The problem is with your post, rsnd; it's shitty. Use a meaningful subject line. Show enough definitions that someone can assess your code. As you see, GameEnder made some assumptions, added some definitions, and got the code to compile. Give the content of your error messages. Indicate what line or statement triggered them.
At 117 posts, and having read the rules and a "How to Post a Question" thread (you have done that, right?), this just shows an infantile approach. This is not ProgrammingKindergarten.org.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
DaWei is still mean to me =(
Dont you at least think that there is something wrong there with classes inside classes and function declarations =( I must be getting old
__________________
Spread your wings and fly! Chicken! |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Hell, I don't cater to kids acting stupid, much less adults. If that's mean, go whine to mama.
If you meant to ask if classes can be nested, why didn't you just ask (or try a simple example out in your compiler). Even if you've read the rules, I recommend you go to them again and click on that "Smart questions" link.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#7 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6
![]() |
yeah, you can nest classes...you can do all types of weird shit.
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#8 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 770
Rep Power: 3
![]() |
What is wrong with this? Scoping rules still apply, so it's just another facet to organizing your code structure.
__________________
<insert disclaimer here> <insert shameless plug for Visual Studio here> |
|
|
|
|
|
#9 | |
|
Newbie
Join Date: Dec 2006
Posts: 3
Rep Power: 0
![]() |
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|