what sort of errors are you getting ?
im not good at C but i know that meaningful variable names would help a lot. what the hell is 'p', 'q' etc etc
--CHris :: g00$em@tt
Type: Posts; User: goosematt
what sort of errors are you getting ?
im not good at C but i know that meaningful variable names would help a lot. what the hell is 'p', 'q' etc etc
--CHris :: g00$em@tt
sure it comes with cc but one time it installed without the gcc compiler. ive never used cc and never been told to use it, thats all. isnt gcc the recommended compiler anyway? *hints at a debate...
right well theres an improvement already!
guyattc2-practical_c3-> ./file
Add a character: c
The character is c
guyattc2-practical_c3->
now you see your other problem is youve not actually...
could your problem be the fact your using a %c in your printf statement and then not assigning the variable associated with it! Rule1 broken perhaps??? *wags finger*
also "int main()" is better...
i use dev-cpp and i open up a seperate cmd (dos , or what used to be dos but now "windowsed") window, and then just compile it in dev-cpp but run it in the cmd window! :D
also from an earlier...
ooooooh! :eek: fair enough, i will read about such great things!
--CHriS
welcome! :)
im a bit of a newbie too! you can of course put while(1) after the code is executed in the int main() function, which basically means while forever (or user closes program) so eg:
...
Well ive not got to the stage in my textbook on I/O so im not sure on responses etc. but here is a little bit .... about bits! :eek:
for instance:
you could create a struct of 3 unsigned ints;...
Not me, Mr Steve Oualline, Practical C Programming by O'Reilly. ;)
--CHriS
gcc -Wall -o file file.c (thats a good start (Wall means turn all warnings on) this is what i get:
guyattc2-practical_c3-> gcc -Wall -o file file.c
file.c:4: warning: return type defaults to...
Guys the problem has been solved! Thankyou for all your support. Something i didn't mention (because i didn't think it necessary) was that I was working on a UNIX machine. I have just been informed...
look at my first post. maybe i didnt explain it fully (i suffer from this disease)
the exercise/question in the book should show that the output will ONLY be HIGH_SPEED and NOT both!
In your...
ahh sure. :o im back at home. was working on this at uni. but yeah i can see all your points now. hopefully it should all be good. although matey, you said your output was both... or did you mean...
hehe guys i think you might be missing the point?!...
The program is *NOT* supposed to work. The whole point of this example in the book is that it was a question to show that you are not supposed...
ok, so outwardly thinking here. im going way out of my expertise ;)
if i made flags an int:
100000000 DIRECT_CONNECT
000000000 flags
---------------- |=
100000000 and therefore 1 and...
ive just confused myself :(
right so:
DIRECT_CONNECT is an int and is set to (1<<8) which is 256.
so when it is bitwise or'd with char flag we get:
(1)00000000 DIRECT_CONNECT
|= ...
well i tried changing it to an int but there was no change. the whole point of this exercise (and chapter) was to explain bit operations. this was my understanding of the exercise when i was typing...
example 11-2:
page 177:
the question:
the HIGH_SPEED flag works, but the DIRECT_CONNECT flag does not. Why?
I could see when i was typing it that you cant shift by more than 7 bits, and quite...
(read previous) YUK
im currently a 2nd year CS student at manchester UK
its quite hard you know, and i also want to do graphics / gaming etc
im doing a graphics module right now, my post is...
key press problem i solved by using the same keypress for all windows...
unfortunately the window position hasnt helped
thanks anyway
i must be making a fundamental mistake (wouldnt put it...
full screen mode?
sounds logical but how do i get 'out' of full screen mode?
all i get is a window without the attributes iof the window like minimize maximize close and the title bar....
i...
heres the code for what i got so far....
case 70:
case 102: /* Fullscreen mode (Additional) : f/F */
fullscreen = !fullscreen;
if (fullscreen)
{...
Hi peeps
Having a little trouble here
I want to switch between windowed and fullscreen modes using GLUT using key 'f' or key 'F'.
I found a glutFullScreen() method which works fine, but when...
Hello all,
i want to use the rand() to produce a float between 0.00000 and 1.00000.
i already have an srand() for a seed.
thanks in advance...
--Goo$ematt :)
Hey people.
Trying to draw a mandlebrot set as a part of a lab session.
Here is my code for mandelbrot.c so far...
#include <stdio.h>
#include <mbrot.h>
int main()
{