![]() |
|
Starting Out: C++ (What I've Learned So Far) - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: C, C++, & Obj-C (https://sinister.li/Forum-C-C-Obj-C) +--- Thread: Starting Out: C++ (What I've Learned So Far) (/Thread-Starting-Out-C-What-I-ve-Learned-So-Far) Pages:
1
2
|
Starting Out: C++ (What I've Learned So Far) - BreShiE - 01-18-2013 As some of you may know/remember, I was learning C++ in College once, but now we're doing it again! This is a great thing for me, I've always wanted to learn this language and seen as though I HAVE to do it for college, there's no geting out of it for me, and I can sit down and learn the language without loosing interest and not going back to it again (like I've done with so many languages). So here I am, sharing with you one of my first programs I've made while at home, I've done a few at college, but this was a practice program to brush up on the code, to try and make it stick! Enjoy! The code (big picture): Spoiler:![]() I was cout'ing answer for a test. That's no longer there. The Preview: Spoiler:![]() The Program: Code: http://speedy.sh/5TKTq/Practice.exeRE: Starting Out: C++ (What I've Learned So Far) - w00t - 01-18-2013 Typecast your variables. Looks neater, prevents errors/exploits. RE: Starting Out: C++ (What I've Learned So Far) - BreShiE - 01-18-2013 What do you mean by "typecast"? RE: Starting Out: C++ (What I've Learned So Far) - Phytrix - 01-18-2013 (01-18-2013, 06:27 AM)BreShiE Wrote: What do you mean by "typecast"? http://en.wikipedia.org/wiki/Type_conversion RE: Starting Out: C++ (What I've Learned So Far) - BreShiE - 02-02-2013 Thanks Phytrix. I don't really see any problems with my code, especially as I'm just starting out with C++ really. RE: Starting Out: C++ (What I've Learned So Far) - DrBlowFish - 02-02-2013 Like this. I have been coding C++ for about a year. I stopped for 3 months, and am just starting again for Malware Development and Game Development. Code: double d;
long l;
int i;
if (d > i) d = i;
if (i > l) l = i;
if (d == l) d *= 2;RE: Starting Out: C++ (What I've Learned So Far) - w00t - 02-03-2013 The hell is that source code, that is ugly and doesn't work at all. RE: Starting Out: C++ (What I've Learned So Far) - BreShiE - 02-03-2013 (02-03-2013, 08:38 AM)w00t Wrote: The hell is that source code, that is ugly and doesn't work at all. What is ugly and what doesn't work at all? RE: Starting Out: C++ (What I've Learned So Far) - Edward - 02-11-2013 I tried C++ once, but I quickly lost interest. Not a bad starting program though. RE: Starting Out: C++ (What I've Learned So Far) - WuhTehFuh - 02-12-2013 Looking good so far ![]() I'm needing to start learning C++ |