Search:

Type: Posts; User: Kotik

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    3,591

    Thanks a ton dwks. You are right about my error...

    Thanks a ton dwks. You are right about my error checking. I do have alot of room for improvment with my indentation.

    That did indeed fix my issue. I'll take that as a lesson to keep my function...
  2. Replies
    4
    Views
    3,591

    SDL code generating Segmentation fault

    I picked up on SDL not long ago and its going pretty slow so far. Here is the code in c of tutorial 3 from the lazyfoo guide. The 2 problems I am having with my code is that I am always getting a...
  3. Replies
    7
    Views
    1,994

    Thanks Matticus, that solves the mystery. Cheers.

    Thanks Matticus, that solves the mystery. Cheers.
  4. Replies
    7
    Views
    1,994

    Thanks for all the answers. That link was very...

    Thanks for all the answers. That link was very useful manasij.

    I managed to install SDL and have been able to comile and run a few "very" basic examples. However I am running into compiler errors...
  5. Replies
    7
    Views
    1,994

    SDK / OpenGL beginner help

    I am 9 months into my 3 year education in programming and this year for my project I decided to make a 2D multiplayer game in C (the only language I have learnt thus far). My goals are to learn and...
  6. Thread: program error!

    by Kotik
    Replies
    19
    Views
    1,681

    Your problem should be solved by the above...

    Your problem should be solved by the above answers. I just wanted to add a little extra by saying that you should probably add an else statement at the end in case the user enters a key that is...
  7. Replies
    6
    Views
    874

    Scanf() is a function not really recommended for...

    Scanf() is a function not really recommended for input because of the kind of issue you are having with your code. What you have to realize is that scanf sure is good for reading input but it has a...
  8. Replies
    3
    Views
    577

    Take a look at fread() and fwrite() when it comes...

    Take a look at fread() and fwrite() when it comes to opening files like text files. I believe the linux rule also translates over to windows that you first have to open and close files before you can...
  9. Thread: characters array

    by Kotik
    Replies
    6
    Views
    671

    The code of yours works great but it could...

    The code of yours works great but it could perhaps be written a bit cleaner. Consider the re-written code.


    int main(void)
    {
    int count;


    printf("Enter a line of text:\n");
    printf("EOF...
  10. Or alternatively you can write the function...

    Or alternatively you can write the function itself before main() if it is a small program like yours. (This is not recommended if you are using lots of functions in the same program, as you'd easily...
  11. Replies
    8
    Views
    1,250

    What Jim is saying at the end of his post is that...

    What Jim is saying at the end of his post is that your scanf is using r.topleft. Note that topleft is a structure inside another structure. Your scanf needs to point to an actual member/vaiable of...
  12. Replies
    1
    Views
    538

    What is wrong with this expression in c?

    I tried to create a program that multiplies a number by 3 and then adds 1 to it and I'm getting wierd results when i use the following code:

    (number *= 3) + 1; //Very wierd outputs.
    number *= 3...
  13. There is also a flaw in your program. In your do...

    There is also a flaw in your program. In your do while loop you have do...while(a==4). Say i input 3 first time it asks for input the output would be "You are incorrect Try again". if I type 3 again...
  14. I dont know exactly what you are trying to...

    I dont know exactly what you are trying to achieve. But in C (not sure about C++), you cannot initialize a struct member whilst the defining of structure type is not complete. What this means is you...
Results 1 to 14 of 14