[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
Nooby programmer here, Help please.
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: 28
Thread images: 3
File: draw poker.jpg (63 KB, 895x632) Image search: [Google]
draw poker.jpg
63 KB, 895x632
I can't figure out what I'm doing wrong. BTW I copied this code word from word from a book that i'm reading. Everything should be going right but I get that error.

On another note, how do I get code block to describe the error to me? It only displays that red box line of the code that has the error.
>>
>>53549474
Language is C.
>>
I think you are missing a { there

The syntax is
{ /* code */ } while(x)


Also, beware of weird " characters that word might give you instead of the standard ASCII "
>>
>>53549492
>{ /* code */ } while(x)
do { /* code */ } while(x)
>>
>>53549474
Use visual studio whatever ide that is looks really bad
>>
>>53549516
It's the IDE that the book told me the use, CodeBlocks.
>>
>>53549516
>Use sublime text or even n++
>>
File: draw poker1.jpg (80 KB, 847x811) Image search: [Google]
draw poker1.jpg
80 KB, 847x811
>>53549492
The open braces before the winning?

Here's a bigger piece of the code if that helps. As far as I can tell all the open braces seem to be closed properly.
>>
>>53549522
Use vs trust me, nobody uses codeblocks, that book was probably written before the community version of vs was released
>>
>>53549544
Could you give me advantages of VS over CB? I just use CB so I can be consistent with the book. With CB...I don't know what the error is...it doesn't describe the error. Just gives mes that red block by the code.
>>
>>53549543
that block at the bottom has no control statement

put a 'do' before the first brace and make the 'While' at the bottom 'while' instead
>>
>>53549541
I use vi at work for the majority of the shit I write, but being realistic vs is a good solution for a new programmer who doesn't understand the toolchain and is on Windows. Intellisense works well too point out what basic errors you have made
>>
>>53549559
ignore that fucktard codeblocks is fine
the better approach if you want to try is to use a simple editor and compile it with the terminal, because that will just tell you what line to change, most of the time
>>
>>53549559
It's an all in one ide, including a debugger which is very important for figuring out your code after you get it compiling. It also has intellisense, which is a tool that attempts to predict the code you're writing, showing members of your structures, function calls, parameters for fncs, etc. It also shows you directly where problems are going to show up pre build.
>>53549578
>Freetards
Go rant about your muh licenses elsewhere, vs is by far the best Windows IDE
>>
>>53549565
I think the control statement is the do on line 67. I looked over everything in the book and that's the way it was written.
>>
>>53549627
>Windows
there he goes again
>>
>>53549657
oh
then make the w lowercase and get rid of the brace on line 101
>>
>>53549667
Windows kernel is far more secure than Linux's, especially with emet. Their kernel team is very good, it's the rest of the people who work at ms that make Windows so shitty. Then again, I'm sure you've never actually programmed at a low enough level to deal with winapi calls so you're just going to try and meme at me with >windows again
>>
>>53549717
>secure
how is this relevant? I mean you're wrong, but it's irrelevant

I'm just going to go right out and say it anon
IDEs only exist so that windows users can compensate for their lack of basic OS functionality that linux users have taken for granted since the 90s
>>
>>53549474
you do i=0;i<4 for suits initially but later on i=0;i<5
>>
>>53549748
Linux still hasn't implemented aslr correctly, they still allow mid opcode execution for rop chains, they still don't have any form of a hypervisor. Please do tell me how Linux is more secure. Jk you're a IT grandpa that doesn't do any real security work and couldn't exploit a uaf even if it was given to him
>>
>>53549809
yeah but
>kernel space scrollbars
>>
>>53549830
You don't even know enough about the windows kernel to comment on the things that are actually funny, like the dozens of odays from ttf being rendered in the kernel because their ui teams fucking retarded (which has been changed). Patchguard is extremely impressive though, go look up skywings writeup on it from before he was hired.
>>
>>53549474
>ranksinHand
>not ranksInHand

shit what are you doing nigger
>>
>>53549903
>camelcasing
>ever

Fuck outa here
>>
File: 1454828166384.png (242 KB, 413x461) Image search: [Google]
1454828166384.png
242 KB, 413x461
>>53549830
>kernel space scrollbars
>>
>>53549474
Looks like you capitalized the 'W' in "While" instead of having it be lowercase on line 108
>>
Thanks all. I figured it out. I was missing some lines of code.
Thread replies: 28
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.