Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

beginner

Name: Anonymous 2010-06-05 20:19

beginner here, just stated learning C++ and i have come up against a small problem. Everytime i run or build one of my projects, the cmd window closes before i can see the results. Is there a way to stop the cmd window closing after it has run the code?
thanks for your time chaps.

Name: Anonymous 2010-06-05 20:22

Windows, yes?
Have you tried running the program via cmd.exe?

beginner here, just stated learning C++
Stop learning C++, it's more pain that it's worth.

Name: Anonymous 2010-06-05 20:25

>>2
yep its windows. I've been opening the .exe instead of running it directly from cmd. I'll give that a try, thanks for the help.
What would you recommend other then C++? my learning is based on what /g/ recommended...

Name: Anonymous 2010-06-05 20:25

>>2
I agree. Unless you need the speed of C++ or the flexibility of it letting you do whatever the fuck you want, don't use it.

Learn something where you'll actually be productive with.

Name: Anonymous 2010-06-05 20:30

>>3
/g/
No wonder.
You're a beginner. Start with a high-level language with a REPL like Python or Ruby or Scheme.

>>4
speed ... flexibility
You don't have a fucking clue what you're talking about. Fuck off back to /pr/.

Name: Anonymous 2010-06-05 20:35

>>5
Much appreciated. I started with Python but was swayed by what I saw in /g/. Would you be able to recommend a good beginners guide or is it fairly easy to stumble across a good one?

Name: Anonymous 2010-06-05 20:43

>>6
/g/'s retarded.

If you need an extremely simple to understand guide, look up A Byte of Python. It won't make you an EXPERT PROGRAMMER, but it'll cover the basics and you can google something better after you're through with that.

I'd honestly suggest learning regular C before anything else, but if you just want to start with something easy, Python is the best route.

Name: Anonymous 2010-06-05 20:46

>>5
How many languages let you mix in assembly? hook in to other processes? read/write memory that's outside the process's scope? Not many. You're a fucking idiot.

Name: Anonymous 2010-06-05 20:47

I started with Python but was swayed by what I saw in /g/.
What does Tidus have to do with anything?

Name: Anonymous 2010-06-05 20:48

>>7
would learning Python first limit me in the future or is it fairly easy to switch between languages once you've learnt one?
Thanks for your help, i should have come here first instead of listening to /g/. should have known better...

Name: Anonymous 2010-06-05 20:52

or is it fairly easy to switch between languages once you've learnt one?
It generally takes a few before it gets ‘easy’ to switch, as languages tend to prescribe certain ways of doing things. For example, it's easier to switch between python and ruby, that it would be to switch between Java and Prolog.

Name: Anonymous 2010-06-05 20:52

>>10
Pretty much every popular, modern language aside from crazy functional languages like Haskell and various novelty languages draws heavy inspiration from C; Python is one of these languages, but there are some crazy things about it THE FORCED INDENTATION OF CODE that make it a bit silly compared to everything else. Still, after learning Python, it's considerably easier to jump into any other language than it would be to try picking one up with no prior programming experience.

My suggestion: begin programming with Python, but also read up on a bit of C.

Name: Anonymous 2010-06-05 20:54

>>8
I know one that does all of that without also being completely brain-damaged. Hint: Bjornie Stripstrap tried to piggyback on its deserved popularity by naming his abomination after it and pretending it was a superset.

Seriously, get fucked. Ignorant idiots like you cultivate the culture of mediocrity that's so pervasive among the Reddit//pr//g/ crowd.

Name: Anonymous 2010-06-05 20:55

>>10
Python won't ruin you like BASIC or Sepples would, if that's what you're asking. You may end up regretting not having all of its power if you switch to lesser languages, but it won't teach you any particularly bad habits.

Name: Anonymous 2010-06-05 20:58

>>14
>>11
>>12
Understood. I'll drop C++ for now and go back to Python. Thanks for all the help gents, it's nice to know there are still some helpful boards out there.

Name: Anonymous 2010-06-05 21:12

>>8
I can do that in any language, but with platform specific extensions: ASM, C, Common Lisp, SEPPLES, C#, O'Caml or even Python and PHP (fuck). All you need is to be able to generate code (can be done in any non-braindead language by writing an assembler, or even in braindead languages if you like hurting yourself) and a small piece of native code (call or jump to a byte buffer) to run arbitrary code on the CPU. Alternatively, you could use the FFI as most languages provide one.

Name: Anonymous 2010-06-05 21:14

>>13
C++ IS a superset of C. Go back to your cave and cry a river.

Name: Anonymous 2010-06-05 21:15

Name: Anonymous 2010-06-05 21:16

>>17
just like java is a superset of sepples.

Name: Anonymous 2010-06-05 21:25

؟what

Name: Anonymous 2010-06-05 21:27

>>18
And even more, if machine code counts.

Name: Anonymous 2010-06-05 22:30

Also a beginner here, not OP.
I did nearly the same thing OP did, dove into C++, yet it would seem better to pick up python to start.
Can anyone recommend me some methods of learning python?
Google is my friend, but people who have learned it already may be  better friends..

Name: Anonymous 2010-06-05 22:33

>>22
Learning to use a command line is a good way to start.

Name: Anonymous 2010-06-05 22:35

>>23
Ok, if you insist.
Any useful links you can dig up to assist me?

Name: Anonymous 2010-06-05 22:35

>>22
The REPL, dir(), and help(). Beyond that, Python is one of those very rare languages where just experimenting on your own will actually do more good than harm even for beginners (though just reading through the online documentation (not third-party tutorials) won't hurt either).
Most actual books on Python are a waste of money. Find an interesting problem on your own and fight your way towards its solution. Repeat a few dozen times.

Name: Anonymous 2010-06-05 22:43

>>25
Ok, i'll start playing around, along with a bit of reading.
Familiarize myself.
Thanks.

Name: Anonymous 2010-06-05 22:59

Well, crap.  My college only offers courses in Java, C++, and Visual Basic.

Name: Anonymous 2010-06-05 23:05

The best way to learn programming is by making it fun. If you find coding the fastest Fibonacci sequence generator fun, then by all means code one. Most of us want to make games, so if you're coding with Python, pick up Pygame.

Name: Anonymous 2010-06-05 23:44

Most of us want to make games,
No, we don't. Fuck, it really is summer around here when people start spouting this.

Name: Anonymous 2010-06-05 23:46

>>28
pygame sucks massive balls, use pyglet. Though in terms of entrance barrier, the lowest I've found has ironically been Allegro in C.

Really, though, anyone who gets into programming to make games isn't going to have much fun and should find a different hobby.

Name: Anonymous 2010-06-06 1:28

Thirty posts in less than four hours. There's some real discussion here. What's going on? This isn't the /prog/ I know and COCK

Name: sega 2010-06-06 3:53

since no one has answered

put this at the end of your program
system("PAUSE")

for shit tier

and

getc(stdin)

for slightly less shitty tier

Name: Anonymous 2010-06-06 3:54

>>32
you mean getchar() ?

Name: Anonymous 2010-06-06 4:07

getchar() == getc(stdin)

Name: Anonymous 2010-06-06 4:36

>>34
false

Name: Anonymous 2010-06-06 6:14

>>32
since no one has answered
Why solve the symptoms, when you can treat the underlying cause?

Name: Anonymous 2010-06-06 9:50

>>32
Though you gave one answer to the question >>1-kun actually asked (even if your form is incredibly poor and it's the least correct of the two possible answers; that honour goes to >>2-san), your reply is also the least useful one in the thread.
/prog/ has realised it's more useful to answer the question the person should be asking rather than the question he does ask, even if that person won't necessarily realise it himself until some time in the future. This is what makes /prog/ far and away the greatest programming community on the public Internet, head and shoulders above pretenders like /pr/ and /code/, and Web 2.0 spin-offs like Reddit and Stack Overflow.
Please keep this in mind the next time you try to contribute.

Name: ​​​​​​​​​​ 2010-09-07 16:16

Name: Anonymous 2010-11-14 6:16

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List