Search:

Type: Posts; User: goosematt

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    2,208

    what sort of errors are you getting ? im not...

    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
  2. Thread: Hello

    by goosematt
    Replies
    18
    Views
    2,206

    sure it comes with cc but one time it installed...

    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...
  3. Replies
    27
    Views
    7,966

    right well theres an improvement already! ...

    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...
  4. Replies
    27
    Views
    7,966

    could your problem be the fact your using a %c in...

    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...
  5. Thread: Hello

    by goosematt
    Replies
    18
    Views
    2,206

    i use dev-cpp and i open up a seperate cmd (dos ,...

    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...
  6. Replies
    7
    Views
    1,292

    ooooooh! :eek: fair enough, i will read about...

    ooooooh! :eek: fair enough, i will read about such great things!

    --CHriS
  7. Replies
    7
    Views
    1,292

    welcome! :) im a bit of a newbie too! you...

    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:
    ...
  8. Well ive not got to the stage in my textbook on...

    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;...
  9. Replies
    18
    Views
    8,139

    Not me, Mr Steve Oualline, Practical C...

    Not me, Mr Steve Oualline, Practical C Programming by O'Reilly. ;)

    --CHriS
  10. Replies
    8
    Views
    2,896

    gcc -Wall -o file file.c (thats a good start...

    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...
  11. Replies
    18
    Views
    8,139

    Guys the problem has been solved! Thankyou for...

    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...
  12. Replies
    18
    Views
    8,139

    look at my first post. maybe i didnt explain it...

    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...
  13. Replies
    18
    Views
    8,139

    ahh sure. :o im back at home. was working on...

    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...
  14. Replies
    18
    Views
    8,139

    hehe guys i think you might be missing the...

    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...
  15. Replies
    18
    Views
    8,139

    ok, so outwardly thinking here. im going way out...

    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...
  16. Replies
    18
    Views
    8,139

    ive just confused myself :( right so: ...

    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
    |= ...
  17. Replies
    18
    Views
    8,139

    well i tried changing it to an int but there was...

    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...
  18. Replies
    18
    Views
    8,139

    practical c programming - oreilly problem ?

    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...
  19. Replies
    35
    Views
    5,363

    (read previous) YUK im currently a 2nd year CS...

    (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...
  20. Replies
    5
    Views
    18,930

    key press problem i solved by using the same...

    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...
  21. Replies
    5
    Views
    18,930

    full screen mode? sounds logical but how do i...

    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...
  22. Replies
    5
    Views
    18,930

    heres the code for what i got so far.... ...

    heres the code for what i got so far....



    case 70:
    case 102: /* Fullscreen mode (Additional) : f/F */
    fullscreen = !fullscreen;
    if (fullscreen)
    {...
  23. Replies
    5
    Views
    18,930

    OpenGL GLUT Fullscreen / Windowed Switching

    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...
  24. Replies
    1
    Views
    1,099

    rand() result required float!!!!

    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 :)
  25. Thread: Stuck

    by goosematt
    Replies
    1
    Views
    1,896

    Stuck

    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()
    {
Results 1 to 25 of 30
Page 1 of 2 1 2