[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
C++ Learning resources/IDE
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 26
Thread images: 3
File: wat.png (195 KB, 1920x1200) Image search: [Google]
wat.png
195 KB, 1920x1200
Hey /g/ I'm currently learning C++ using Bucky's (thenewboston on Youtube) guides, and it's pretty good so far. What other resources do you guys recommend for self-teaching after I finish that?

Another question, I'm using Code::Blocks as an IDE, but I prefer Visual Express 2013. However, whenever I develop a Console32 program, it doesn't seem to like compiling my code in pic-related. Why is this? Can anyone advise?
>>
did you forget to add '#include stdafx.h
>>
>>52104434
using namespace op_is_a_cock_eating_faggot;
cout << "read a fucking book" << endl << endl;
>>
>>52104434
>Console32 Program
why
>>
>>52104459
You shouldn't need to.
The world's most simple C++ program can be written in 7 lines, as follows

#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;

return 0;
}

Ignoring blank lines, obviously.
>>
>>52104508
Well I'm a noob at C++, so I don't know how to create a GUI for the simplest of programs. Hence, Console32.
>>
>>52104524
You should just make an empty project then and add your files and compile, console32 makes a windows specific console application that does a bunch of extra stuff out of the norm for a typical c++ program like use a stdafx.h file.
>>
>>52104512
>The world's most simple C++ program
>Includes namespace declaration.
>Function does anything more than a simple return.

Anyway, that's not the case in VC++ which OP is using.
Switching the compiler to gcc++ should solve the "problem".
>>
>>52104599
How do I switch compilers?
>>
>>52104524
Windows is a dog shit platform to learn C++ on. Learn to program on Linux, where it's MUCH more simple, then later learn how to implement what you learned to Windows if you really want to.
>>
>>52104728
I was just saying that he made a windows based console project when he could just make a simple blank console project and if he just uses stuff in the standard library he can compile it for different computers since there will be no windows dependent code, unlike in the project he has currently. He can still learn c++ fine in a windows environment but don't user windows specific code, just learn the standard library.
>>
File: 1451308211672.jpg (153 KB, 682x1024) Image search: [Google]
1451308211672.jpg
153 KB, 682x1024
>>52104626
install gentoo
>>
>>52104626
There is a way but it is a far cry from the build-essential on Unix systems.
VC++ is slightly lagging behind but you should be fine for the time being.

Just go with >>52104772's advice and simply don't use the provided template to make the project and it should use standard console for output.
>>
>>52104986
I tried the same program, but just disabled pre-compiled header - fixed it.

But I've switched to a project instead, as opposed to a console application.
>>
>>52104434
you need to select empty project in the new project wizard then add source files to it. the default win32 console application makes use of precompiled headers which will confuse you at the moment.

to fix the issue in your screenshot though you need to include stdafx.h in your main .cpp file and only put #include <iostream> in your stdafx.h instead
>>
>>52105129
I disabled it, as mentioned in >>52105066, but thanks for your advice.

I've moved to projects anyway - I don't need to specifically use Console32 while I'm learning.
>inb4 you do
>>
>>52104772
Windows just bugs me with how ass backwards compiling code is, and how there's no good substitute for Make. I've always ended up having to install some Gnu-on-windows crap.

I suppose if you followed the Microsoft toolchain all the way and did all your linking and compiling in Visual Studio it'd probably be okay, but that's a shit way to learn the language: it fosters too much superstition.
>>
File: 1450366790413.jpg (118 KB, 497x640) Image search: [Google]
1450366790413.jpg
118 KB, 497x640
>3 days before 2016
>still programming in windows
>>
>>52104599
Can confirm, using gcc
>>
>>52105199
it is strange how you can easily install MSYS2 and then clang or gcc (mingw) and compile with a simple make
>>
>>52105129
Also this, choose empty project and add your cpp and h files manually in the source and headers folder provided in the project explorer
>>
>>52105284
>having to install some Gnu-on-windows crap
If you're going to use Gnu tools, at least be a man about it and actually use Gnu.
>>
>>52105368
what do you mean? what is wrong with mingw/msys2?
>>
>>52104512
>USING NAMESPACE

fuck off nigger.

>>ITS SO HARD TO TYPE STD::COUT
>>
>>52104434
https://isocpp.org/get-started
>>
>>52104512
If you're going to get technical and correct someone at least know that namespaces don't have to be used either.

In fact the larger the program the less suited namespace declarations are.

std::cout should be used. It is best practice
Thread replies: 26
Thread images: 3

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.