I'm learning like a snail.
I'm learning like a snail
Other urls found in this thread:
stackoverflow.com
twitter.com
>.cc
>all languages except C
>Print("String")
>C
>std::cout
.cc is the proper extension for C++ programs
>not using .cxx
just use .C
at least you're learning
You just outed yourself for knowing neither C nor C++.
C++ you negroid
>not using .c++
in C it's puts("string")
I remember reading that puts() was bad practice, but I forget the reasons.
>using namespace std
>std::
What did OP mean by this ?
>starting with sepples
Start with python. You need fundamentals and python makes applying stuff easy, c++ is the exact opposite of what a beginner needs.
Now we're arguing over file extension that doesn't matter.
not using .cpp like a normal human being
Is SDL2 still relevant today?
Yes.
OP find a decent C++ book with best practices. Like don't ever use using namespace std
How is it relevant?
>using namespace std
>still puts std:: on all cout calls
why
Valve uses it for all their games for crossplatform support. Anyone doing a crossplatform game with a from scratch engine should use it for easy crossplatform. Sfml is good too.
>using namespace std;
>std::cout
var messages = ['lets','get','this','bread']
for (i = 0; i < messages.length; i++) {
console.log(messages[i]);
}
see
Iterate over an array to save yourself time typing std::cout over and over again. In your case you would also include an if statement checking to see if the loop isn't at the end of the array length and then have "\n" concatenated to each string.
Actually you could drop the if statement there if your next print is going to be on a new line anyways.
If you have your namespace as std you don't need to use std:: user
me too, feels good men. slow and stady winns the race.
t. millennial
if you use namespace std, that means you won't need to prepend the std:: to cout or anything else from std.
be cautious about using namespaces in that way though, if you start to use other libraries that use the same function names for totally different functions (such as exampleone::function and exampletwo::function), there will be hell to pay some way down the line. just get into the habit of not using namespace for now.
also, as your main function is returning an int, you *should* return 0 as the last command of that function. It's good practice, returning 0 means the function executed properly, any other number means there was some kind of error.
happy learning
Not using .hpp
>puts
pls no
use printf() like a white man
Best thing to do is find work requiring you to learn some programming. I learned a language in like two weeks because of that.
Though I'll admit, that doesn't mean I made good macros.
Why is it bad? Wouldn't it be better since it doesn't need to worry about interpolation?
le ebic bait :DDDD
>not using .hailvictory1488fuckniggers as extension
fucking pleb
Won't compiler catch this anyway and report an error that the call to function is ambiguous?
What color theme is that?
>being a normal human being
why does c++ have so much boilerplate? so much for not being bloated.
Sorry I was thinking gets not puts.
Puts apparently appends a \n and isn't faster or slower than printf so use it if you want I guess.
Printf is still a white man's function.
Hopefully
>so much for not being bloated.
who says c++ isn't bloated?
>I was merely pretending to be retarded
Here are some examples where that might not behave as one might expect:
stackoverflow.com
>spend entire day reading programming book
>understand everything perfectly
>forget it literally the next day
I think I have a brain defect.
Can I lick your armpits, then?
You're learning. That's better than most. Keep going snail-user, you've got this.
Me too, OP.
Me too.
What?
You have to make sure you're practicing when you learn, not just reading.
Where's the boilerplate?
one or two of the first two premises is false.
never stop
progress however slow is still progress
the day you quit is the day you become deprecated and flagged for replacement
install gentoo you will become 10x times faster
>using namespace std;
>std::cout
are you serious?
The reply is saying your code is nonsensical dogshit.
>using cout instead of printf
vscode has changed a lot since I first saw it.
I wonder how much ms optimized it beyond its electron base.
vim + jedi user here btw
redundancy at best. OP you're calling your namespace twice.
this
desu