Z
Z
Zefirych2013-11-13 14:43:54
C++ / C#
Zefirych, 2013-11-13 14:43:54

How to start programming in C/C++/C#?

Greetings to all who nevertheless decided to come and answer this, probably, the thousandth question, to which none of the newcomers can find a meaningful answer.

In general, in short, I started programming back in the 7th grade, after 2 years of theory at school, we finally switched to practice and not just anywhere, but right away in Pascal. Everything turned out well for me, even very well. The teacher praised incredibly, sent me to the Olympiads, where I took 1-2 places. But. At a certain point, as I progressed, I got stuck somewhere, so much so that I generally stopped understanding what was at stake. I sat reluctantly in computer science classes and howled when it would end.

Then little by little we switched to Deplhi. What can I say, I seemed to come to life again, but be that as it may, the same problem remained, I understood, but not completely.

Step by step sailed to HTML and then the same rake. And in the end he scored (which I regret, by the way). So, now I'm out of school, I'm going to computer science next year, and I have a desire to learn C/C++/C#, because I want to program in the future under iOS/OSX. I read on Habré that the best textbook on C - Kernighan "Programming in C" 2nd edition. I read up to the very first task about "hello, world", if anyone remembers, and then the problem began: wherever I tried to implement this "program", an error occurred everywhere. I tried MS Visual C++, C++ Builder, CodeLite, but didn't succeed. I would like to know what is my problem and how to solve it. Can not those compilers selected? And in general, which compiler to take, to solve problems from Kernighan's book? Or maybe I didn't take it? There is a mess in my head and I definitely won’t rake it myself.

Answer the question

In order to leave comments, you need to log in

17 answer(s)
A
AxisPod, 2013-11-13
@Zefirych

Well, you already decide what you want, C, C ++, C #, these are 3 different programming languages, if C ++ supports C libraries, then C # is a completely different programming language, C ++ / Cli in this case is also another language that does not has nothing to do with C# and allows you to generate managed code in C++.

In general, I once installed Visual C ++ 6.0, opened the site http://firststeps.ru and away we go. I started with tutorials, then I started reading C++ books. Stroustrup, Alger, then got to Alexandrescu.

And Kernighan is C.

Install Visual Studio 2013 Express and don't suffer (if under Win). It's better not to touch C++ Builder at all. CodeLite is generally an IDE, not a compiler. The previous 2 come with their own compilers. Well also create projects of console applications.

B
B16, 2013-11-14
@B16

Си - Кернигана "Программирование на C" 2-ое издание
I was also reading this book until I stopped. I used DevC++ for compilation. I created an empty project, saved it as a .c project file, everything compiled and worked.

A
Alexander, 2013-11-13
@alexyat

Download Visual Studio and go through simple lessons here they will streamline your mess.

A
afiskon, 2013-11-13
@afiskon

1. Take a random problem from the list http://eax.me/programming-language-learning/ 2. Solve 3. Goto 1

I
IURIA, 2013-11-14
@GxocT

I started my journey to iOS programming with the Kernighan and Ritchie book you mentioned earlier.

I used Eclipse + MinGW under Windows as a development environment. http://www.eclipse.org/ http://www.mingw.org/

To learn Objective-C I used: iOS Programming: The Big Nerd Ranch Guide - Joe Conway , Aaron Hillegass. Programming iOS 5 - Matt Neuburg. Worked and studied the language on VM.

S
Sergei Borisov, 2013-11-13
@risik

Kernighan is now hard to read as a first textbook. Because, for example, helloworld from Kernighan is written something like this:

main()
{
  printf("Hello World!");
}
and if you actually have a compiler not C, but C ++, which is very likely given the indicated development environments (except for CodeLite - I don’t know anything about it), then this is actually a mistake. Necessary
int main()
{
  printf("Hello World!");
  return 0;
}

S
Sergei Borisov, 2013-11-13
@risik

And once again, you want under iOS / OS X, then C # is not the best choice for you.

N
Nikolai Turnaviotov, 2013-11-14
@foxmuldercp

I would first decide what I want to write for: something low-level - c, c++, it's the same with variations under linux / macos Windows - Marketplace, Desktop, Windows Phone - C#, XAMl, HTML, Asp.Net MVC....

D
Dimm38Rus, 2013-11-13
@Dimm38Rus

If you are interested in C++, then as a former Delphi lover, I can advise you to start with the books of Herbert Schildt, specifically "C++. Basic Course". Very accessible and well written, easy to read.

Also look towards Qt. A wonderful multi-platform C++ framework with a simple and user-friendly IDE, excellent documentation and free of charge. You can even program a little with the mouse, so the transition from Delphi will be less painful.

B
B16, 2013-11-14
@B16

Comments can't be edited? Hmm, then here's a link to: Dev-C++

K
KeeperRU, 2013-11-13
@KeeperRU

Yes, a typical problem when learning a new language. It's not as hard to write your first program as it is to compile your first program. :) The authors of such books either omit this item, or it becomes hopelessly outdated.

A
Alexey, 2013-11-13
@Deia

For starters, C++ Schildt G. The C++ Basic Course (3rd edition, 2010) is a good option. Similarly, there is C# from the same author. But as already said, languages ​​are different.

L
lo-fi, 2013-11-14
@hrls

K&R C vim clang or gcc

Z
Zefirych, 2013-11-14
@Zefirych

In general, how long will it take to learn C++ according to Kernighan? It’s just that for the second day I don’t seem to come off the book, but I only reached 1.5.4 "Counting words", despite the fact that I could not solve the last 3 tasks myself. It's not a sign of my dementia, is it?

There is one more minus: I don’t have any acquaintances / friends / buddies who have even heard about C ++, so I have to figure it out myself, and I found their explanation with the solution on the Internet for those three tasks, but anyway, it seems to me that it didn’t bring no use.

C
chico666, 2013-11-15
@chico666

Similarly, I encountered the same compilation problem, the IDE with the compiler throws out a mountain of errors and the program does not start. I inserted the code from the book into the IDE.

M
Man-Soul, 2015-02-15
@Man-Soul

Installed CodeLite 7.0 (OS WinXP SP3).
Tell me how to set it up? The problem is that the simplest program "Hello World" does not compile (there is no this text in the console), and also the "spoiled" text is displayed below (i.e. encoding problem):

C:\WINDOWS\system32\cmd.exe /C "mingw32-make.exe -j 1 -e -f Makefile"
"mingw32-make.exe" ¥ ï¥âáï ¢ãâ॥© ¨«¨ ¢ ¥è¥©
ª®¬ ¤®©, ¨á¯®«ï¥¬®© ¯à®£à ¬¬®© ¨«¨ ¯ ª¥âë¬ä ©«®¬.
0 errors, 0 warnings
I also installed the compiler in the "C:\MinGW\" folder. Maybe the path to this compiler needs to be written somewhere else?
Screenshot of the program

T
trtr7dr, 2015-10-09
@trtr7dr

Download PyCharm and run http://comuedu.ru/post/how-to-program-on-mac

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question