Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~381 People Reached
Favorite Forums
Favorite Tags
Member Avatar for Yee

Hi! I have had to change from Python to C because of university instructions. My problem is that, when I want to make a menu for my program or whatever, I always want to define classes:P My question is simple --> are structures the best way to "replace" classes? TY

Member Avatar for gerard4143
0
98
Member Avatar for Yee

OKay... I have a newbie question. [code=c++]#include <stdio.h> class Test{ public: Test(int x); }; int Test::Test(int x=0){ } int main(){ Test test(1); printf("%d", test.x); } [/code] My question is how to make the x variable of the constructor public. I have tried to add : [code=c++] public: int x = …

Member Avatar for mrnutty
0
104
Member Avatar for Yee

HI! I have a problem: I want to initalize a class by a condition. For example: [CODE] class something: def __init__(self,a): self.a = a if self.a == 0: #break initalization else: #continue initalization [/CODE] How do I break the initalization? Thank u and sorry for my english!

Member Avatar for Yee
0
179