Search:

Type: Posts; User: LightYear

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: Help please

    by LightYear
    Replies
    6
    Views
    1,211

    What a mean spirited response. The proper way to...

    What a mean spirited response. The proper way to do this is (and help the person learn in the process) is to let them give a it a try, then let them post updated code, when give hints, let them try...
  2. Replies
    60
    Views
    18,580

    Coffee that sounds good I think I'll make some. ...

    Coffee that sounds good I think I'll make some.

    Working on chem right now...need a 5 minute breather.

    Wont change code yet.
  3. Replies
    60
    Views
    18,580

    Thanks for the help Adak this ones been a bear,...

    Thanks for the help Adak this ones been a bear, fun though so far. Programming is now starting to become interesting to me. I can begin to see applications to my own field, a little bit...
  4. Replies
    60
    Views
    18,580

    I'm having trouble with this as well, I dont get...

    I'm having trouble with this as well, I dont get it :(


    Option 1- play game
    Option 2-Quit game
    enter your choice: 3
    enter your choice: 3
    Invalid choice, enter 1 to play, 2 to quit.
    enter...
  5. Thread: Need Help!!

    by LightYear
    Replies
    5
    Views
    1,000

    with any function the type comes first. the...

    with any function the type comes first. the parameter/s go inside the brackets.

    void main(void)

    type main(parameter)
    function name= main

    int main(void)
    type=integer
  6. Replies
    60
    Views
    18,580

    Hi guys! So much work this week, finals this...

    Hi guys!

    So much work this week, finals this week and next!


    I had some more questions since I'm back on this again (its late, but the grade will be the grade of the project that I demo...
  7. Replies
    60
    Views
    18,580

    Ah yes! But mine had the failsafe (when that...

    Ah yes! But mine had the failsafe (when that return read_hit() is written correctly and it works, at least)

    the failsafe was that if the user entered data that wasn't between 1 and N then it would...
  8. Replies
    60
    Views
    18,580

    If anyone gets a chance, plz can you explain one...

    If anyone gets a chance, plz can you explain one more thing.

    The problem with the read_hit() function:


    Here is the version adak recommended, I know its better than mine, I just don't see how,...
  9. Replies
    60
    Views
    18,580

    Hey why don't you give it a try! The only...

    Hey why don't you give it a try!



    The only problem I'm having now is that, for some reason, it looks like its only displaying a 1 dimensional array somehow, which is odd.


    That, and don't...
  10. Replies
    60
    Views
    18,580

    Wow something that simple, you've got the eyes of...

    Wow something that simple, you've got the eyes of a hawk.


    Well I think now would be a good time for me to check all the functions and function calls for consistency.


    Update: Okay I got it...
  11. Replies
    60
    Views
    18,580

    #include #include ...

    #include <stdio.h>
    #include <stdlib.h>
    //#include <stdbool.h>

    #define N 8

    void displayBoard(char board[N][N]); //Displays the board
    int readMenu(void); //Reads a 1 or a 2
    int...
  12. Replies
    60
    Views
    18,580

    Yes one sec will edit this post and add code one...

    Yes one sec will edit this post and add code one sec
  13. Replies
    60
    Views
    18,580

    Sorry had to do chemistry and calc II homework....

    Sorry had to do chemistry and calc II homework. Okay back on now....

    Claudiu: when I compiled I got the errors listed before, these ones:



    Undefined first referenced
    ...
  14. Replies
    60
    Views
    18,580

    Yeah the read_hit() function seems like its...

    Yeah the read_hit() function seems like its always going to print invalid data,

    because while(i) is always going to be true...

    I'm definitely confused now :(
  15. Replies
    60
    Views
    18,580

    I don't usually use do loops, but... int...

    I don't usually use do loops, but...



    int i= 0, temp;

    do {
    /* 888888888888 prompt needed here! 88888888888 */
    scanf("%d", &temp);
    if(i)
  16. Replies
    60
    Views
    18,580

    Thanks adak. What do you mean by the...

    Thanks adak.


    What do you mean by the //prompt needed here?

    I'm going to try and modify this to randomize, but before I do, I was wondering what these compiler errors mean, if anyone could...
  17. Replies
    60
    Views
    18,580

    so I need to change the while loop then, because...

    so I need to change the while loop then, because I can't make it while(0), it literally is ALWAYS going to be while(1)

    could I do while(user!=2)

    or would that not work since readmenu(), which...
  18. Replies
    60
    Views
    18,580

    while(0) then will be the case when return 0...

    while(0) then will be the case when return 0 occurs, as when the user enters 2?

    So its going to read the whole "welcome to a battleship like...etc" after each entry of a row and column?

    If...
  19. Replies
    60
    Views
    18,580

    breaking the loop

    Made a bunch of corrections, the only problem now is visualizing how to exit that while loop.

    Question: when the user enters a 2, return 0 is executed, terminating the while loop right?

    If...
  20. Replies
    60
    Views
    18,580

    Thanks guys will do. Have to go make dinner (my...

    Thanks guys will do. Have to go make dinner (my night to cook) then will be back on for as long as it takes.

    Will try not to overpost also.

    I know row and col are int! *hmph* jk I just missed...
  21. Replies
    60
    Views
    18,580

    sure thing one sec sorry! I was going to post it...

    sure thing one sec sorry! I was going to post it



    battleshipv2.c:10: error: syntax error before numeric constant
    battleshipv2.c: In function `main':
    battleshipv2.c:21: error: conflicting...
  22. Replies
    60
    Views
    18,580

    IDE

    I was looking at the eclipse tutorials....

    is there an easy way to import the battleshipv2.c i created on SSH (I am accessing school server remotely) and I want to mount it/load it onto the...
  23. Replies
    60
    Views
    18,580

    Ok I cleaned it up, but still won't compile. ...

    Ok I cleaned it up, but still won't compile.

    Improved I think though yea? maybe? :( I don't know, I feel good now. For like 2 weeks this project looked impossible, but at least now I understand it...
  24. Replies
    60
    Views
    18,580

    thanks claudiu, made some corrections. If you...

    thanks claudiu, made some corrections.

    If you get a chance to breeze by here again, I really appreciate your help.

    New version:
    compiler said error before the #define (that was first error...
  25. Replies
    60
    Views
    18,580

    Drowning!

    Okay I think I almost have the basic program now, could someone plz look it over for me. What does this first compiler error mean?


    Do I at least have the semantics right now?


    ...
Results 1 to 25 of 103
Page 1 of 5 1 2 3 4