Why Do These Guys Have A Problem With My Code?

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
adabo
Posts: 154
Joined: October 27th, 2012, 3:28 am
Location: Houston, Texas

Why Do These Guys Have A Problem With My Code?

Post by adabo » November 22nd, 2012, 5:50 pm

Everything I really know about C++ is from Chili's tutorials. When I went to help someone on reddit they claim that I'm not using C++. Why?

Here's a screen-shot and the source (search for adabo): http://www.reddit.com/r/learnprogrammin ... rstanding/
Attachments
Untitled.png
(26.78 KiB) Downloaded 289 times

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Why Do These Guys Have A Problem With My Code?

Post by LuX » November 22nd, 2012, 7:52 pm

Can't say for sure why he claims it's not C++

By "void main" not being correct, he probably means you should use "int main" because it needs to return a value to work securely.
The next part I don't know. Maybe you use something like char* and he suggests you to use the std::string method.
Or then you used some other C method and pros come complaining you should use C++ methods instead.
ʕ •ᴥ•ʔ

adabo
Posts: 154
Joined: October 27th, 2012, 3:28 am
Location: Houston, Texas

Re: Why Do These Guys Have A Problem With My Code?

Post by adabo » November 22nd, 2012, 8:16 pm

Pros? I get the feeling they arent there to help, rather just point out people flaws. Well anyway, thanks LuX.

Some people just look for ways to prove others wrong instead of giving helpful feedback

User avatar
npissoawsome
Posts: 114
Joined: June 8th, 2012, 3:01 pm

Re: Why Do These Guys Have A Problem With My Code?

Post by npissoawsome » November 23rd, 2012, 2:58 am

void main() is C++, it's 100% C++ lol.

But yeah as Lux said, he probably is being a bitch and wants you to use
int main(int argc, char* args[])

adabo
Posts: 154
Joined: October 27th, 2012, 3:28 am
Location: Houston, Texas

Re: Why Do These Guys Have A Problem With My Code?

Post by adabo » November 23rd, 2012, 7:06 pm

Yeah, I'm just trying to let it go. I just want to help people any way I can, but then I have to contend with people like that who are just there to shoot your down. It's frustrating.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Why Do These Guys Have A Problem With My Code?

Post by chili » November 27th, 2012, 2:03 pm

They make some good points, but their missing the main point. Dude wants to learn how pointers work. Who cares whether or not the entry point definition has a 100% standards compliant signature :/.

They also make some blatently false assertions, like that stdio is deprecated (unless he meant use cstdio, but that's not what I think he was meaning). Anyways, just screw em. :lol:

P.S. where is this tutorial of yours? :)
Chili

adabo
Posts: 154
Joined: October 27th, 2012, 3:28 am
Location: Houston, Texas

Re: Why Do These Guys Have A Problem With My Code?

Post by adabo » November 28th, 2012, 3:57 am

Thanks for the reassurance chili. I see you made a stand for the purpose of the tutorial (reading your youtube comments). My aim was just to keep it to the bare minimum. I honestly don't see how understanding a concept can be harmful, even if the syntax is not all that common. The pointer syntax is :) Isn't that what matters? Had some positive feedback already, so I know it's working well for particular minds like my own.

Post Reply