Xupicor's Profile
Reputation: 247
Stalwart
- Group:
- Expert
- Active Posts:
- 578 (0.8 per day)
- Joined:
- 31-May 11
- Profile Views:
- 4,152
- Last Active:
Feb 07 2013 05:32 PM- Currently:
- Offline
Previous Fields
- Country:
- PL
- OS Preference:
- Linux
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- PC
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Latest Visitors
-
Michael26 
12 May 2013 - 08:29 -
ehsanecc 
05 May 2013 - 02:03 -
darek9576 
16 Apr 2013 - 16:16 -
ccubed 
05 Apr 2013 - 20:07 -
LarcaCode 
21 Feb 2013 - 03:46 -
aresh 
20 Feb 2013 - 14:43 -
AKMafia001 
17 Feb 2013 - 11:45 -
raghav.nagana... 
08 Feb 2013 - 03:25 -
AnalyticLunatic 
08 Jan 2013 - 12:26 -
Mirslr 
25 Dec 2012 - 15:13
Posts I've Made
-
In Topic: DIC 2012 Community Awards- Winners
Posted 20 Jan 2013
I'm third... *Dazzled*
I mean, thank all of you who have taken your precious time and voted for me. I honestly did not deserve it, but I'm quite touched and, well, startled.
Congratulations for all the winners, you made it.
-
In Topic: Initializing class member variables?
Posted 11 Dec 2012
Okay, my bad then. -
In Topic: changing elements in array
Posted 9 Dec 2012
When in doubt - read the docs!
string::find doesn't return bool but size_t signifying a position at which sequence was found. If it's not found, string::npos is returned. -
In Topic: When does a destructor run in C++
Posted 9 Dec 2012
@OP, and my example
That goes without saying that if you want to know what happens you really should get some good source (recommended C++ books, ISO/IEC C++ standard if your stomach is up to it) and read about what is guaranteed and what is not.
TIAS (Try It And See) is great, but remember that with C and C++ just because code compiles and "works" doesn't mean it's valid. Also, just because your compiler does some things some way doesn't always mean that some other won't do it differently. There are things that are guaranteed by the language standard, but... Undefined behaviours are not as hard to invoke as you'd think, so beware.
TL;DR: If you find yourself guessing at something, then stop and check source material. -
In Topic: Initializing class member variables?
Posted 9 Dec 2012
@Midi_ - Note that you didn't initialize your variable here:
Circle::Circle(){ pi = 3.14; }
You assigned a value to it, that's different. If you want to initialize it, you need to use initialization list:
Circle::Circle() : pi(3.14) { // ... }
Even if you don't see it at first, there is a difference. See below:
// obj is an object of class B // value is an object of class C A::A() { obj = value; }
Here, first, default constructor B::B() is called, after that obj is fully initialized, then B::operator=(const C& value) is called.
A::A() : obj(value) { }
And here parametrized constructor B::B(const C& value) is called and initializes obj.
See the difference? The first code can even prevent compilation if class B has no fitting operator=.
My Information
- Member Title:
- Nasal Demon
- Age:
- 27 years old
- Birthday:
- March 20, 1986
- Gender:
-
- Location:
- Paris, France
- Interests:
- Programming, IT, bits of cosmology and philosophy, history (focusing on WWII lately), s-f (Asimov, Lem, Dick...) and fantasy (Tolkien, Sapkowski, Le Guin, Modesitt...) books, good movies (Tarantino, Nolan, Polański, Scorsese, Kurosawa, Kubrick... and more), sometimes an anime movie or series (Ghost in the Shell, Cowboy Bebop, LoGH, House of Five Leaves, Mononoke, etc). I enjoy playing RTS and RPG games (that includes browser text-based fable-driven ones), and sometimes hunting my pals as an alien in AvP2, or playing as a platoon commander (or helicopter pilot) in Battlefield 2.
- Full Name:
- Tomasz Wota
- Years Programming:
- 5
- Programming Languages:
-
Pretty good: C, C++, PHP
Not too shabby: Java, JavaScript, Python
Bit rusty: Perl
Can't remember a thing: Atari 128 & Commodore 64 BASIC, Pascal
Learning (or planning to): C#, LUA, Haskell, Scala
Thinking about glancing trough: Mathematica, D, Objective-C, Go, R, Clojure, Curl (not libcurl :P)
Contact Information
- E-mail:
- Private
|
|


Find Topics
Find Posts
View Reputation Given



|
Comments
aresh
12 Feb 2013 - 12:11Ain't my observation correct? ;)
raghav.naganathan
08 Feb 2013 - 03:26raghav.naganathan
08 Feb 2013 - 03:23raghav.naganathan
08 Feb 2013 - 03:23aresh
01 Feb 2013 - 22:06http://www.dreamincode.net/forums/user/603453-raghavnaganathan/
Read the last 2 comments!
aresh
01 Feb 2013 - 22:06aresh
01 Feb 2013 - 05:39aresh
26 Jan 2013 - 14:56And Asimov is also on my list, but I just can't find the time to read his works with studies, gaming and programming hogging up all of my time...
aresh
26 Jan 2013 - 14:20aresh
26 Jan 2013 - 14:20And I understood your meaning after googling a little bit :D
aresh
20 Jan 2013 - 18:16aresh
20 Jan 2013 - 10:01aresh
20 Jan 2013 - 09:46raghav.naganathan
13 Jan 2013 - 22:52raghav.naganathan
28 Dec 2012 - 04:35