Search:

Type: Posts; User: Nit

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: little help

    by Nit
    Replies
    1
    Views
    816

    My MSN Messenger alias is: [email protected]...

    My MSN Messenger alias is: [email protected]

    Contact me anytime tonghgt for any help, comments, questions, you may have.
  2. Replies
    4
    Views
    2,335

    Here's a start. struct car { ...

    Here's a start.





    struct car {
    char color;
    int ignition;
    int xCoordinate;
  3. Thread: Swap Function

    by Nit
    Replies
    2
    Views
    1,782

    int i; int array[size]; void swap(your...

    int i;
    int array[size];

    void swap(your parameters) {
    i = array[swapindex];
    array[swapindex] = newvalue;
    array[indextoswap] = i;
    }
  4. Replies
    4
    Views
    1,368

    Could you do two things for us before we begin. ...

    Could you do two things for us before we begin.

    1. Use code tags ([.code] and closing [./code]) without the periods.

    2. State your problem exactly.
  5. Replies
    3
    Views
    1,584

    I did an application like that in an early CS...

    I did an application like that in an early CS class. I had a lot of fun learning about the unix system and the different structures I had to work with.
  6. Replies
    18
    Views
    2,363

    Almost every problem in the programs that are...

    Almost every problem in the programs that are posted is caused by programmers using scanf, while having a \n still in the buffer.

    A simple solution to this would be to simply use fgets.
    ...
  7. Replies
    10
    Views
    7,792

    Use fgets. #define MAX_INPUT = 100 ...

    Use fgets.




    #define MAX_INPUT = 100 //whatever you like

    char buffer[MAX_INPUT + 1];
    fgets(buffer, MAX_INPUT, stdin);
  8. Replies
    9
    Views
    3,989

    just type: #include "myFile.c" where your...

    just type:

    #include "myFile.c"

    where your other includes are.
  9. Replies
    4
    Views
    2,049

    Check out these include files. #include...

    Check out these include files.

    #include <sys/socket.h>
    #include <netinet/in.h>

    You may want to really look at this structure.

    struct sockaddr_in servaddr;
  10. Replies
    65
    Views
    17,885

    don't use dot notation to access that structure's...

    don't use dot notation to access that structure's data fields. Use the -> operator.

    struct customer *john;

    john -> balance = 2.54;

    And try,..
    CUSTOMER bankrecords = (struct customer *)...
  11. Replies
    3
    Views
    1,249

    #include #define MAXROW 50 ...

    #include <stdio.h>

    #define MAXROW 50
    #define MAXCOL 100

    main ()
    {
    int Row_Num, Col_Num;
    char Map[MAXROW][MAXCOL];
    char Moves[50];
  12. Replies
    6
    Views
    3,051

    I'm still lost. Ugh. Let's say your header...

    I'm still lost. Ugh.

    Let's say your header file has this inside of it.

    myHeader.h
    #define maxline 1024
    #define minline 10

    myProg1.c
    #include "myHeader.h"
  13. Replies
    6
    Views
    3,051

    #include "Loader.h" This statement is correct...

    #include "Loader.h"

    This statement is correct and any code that you wrote within that header file will be entered into your code during the preprocessor stage.

    But, if that's not what you mean,...
  14. Replies
    2
    Views
    871

    strcmp(s1, s2) returns 0 if they are equal. ...

    strcmp(s1, s2)

    returns 0 if they are equal. returns 1 if s1 is greater than s2 and returns -1 if s1 is less than s2.
  15. Replies
    2
    Views
    1,718

    Re: hangman need help with strings and pointers

    .
  16. Replies
    9
    Views
    2,025

    Re: Clear function numbers 0 to 30

    Coded by fred_scotland

    [B]#include <stdio.h>
    while(( n < 0) || (n > 30 ))
    {
    printf("Wrong! number must be in the range 0 - 30\n");
    scanf("%i", &n);
    fflush(stdin);
    }
  17. Replies
    2
    Views
    10,342

    I'm sure you could STFW or search the C++...

    I'm sure you could STFW or search the C++ Programming Board that is also included within this site. If that's a homework problem (which I assume it is) make sure you read the sticky post about that...
  18. Replies
    7
    Views
    1,684

    #include #define MAXLINE 1024 int...

    #include <stdio.h>
    #define MAXLINE 1024

    int add(int, int);
    int subtract(int, int);
    int multiply(int, int);
    int divide(int, int);

    float result = 0.0;
  19. Replies
    7
    Views
    1,684

    The spaces take care of the newline buffer...

    The spaces take care of the newline buffer problem. Try fgets instead....

    due to fgets solution below
  20. Replies
    2
    Views
    881

    I can just imagine him/her searching the web for...

    I can just imagine him/her searching the web for STFW...
  21. Thread: Pointers

    by Nit
    Replies
    10
    Views
    1,753

    A pointer is just a variable that holds a memory...

    A pointer is just a variable that holds a memory address.

    [Edit]I'm not a very good teacher, so my analogy might just be that terrible...

    int *y;
    y is now a pointer to an integer. The value...
  22. Thread: mp3 and waves

    by Nit
    Replies
    2
    Views
    1,403

    Re: mp3 and waves

    Try this link, C++ Programming Board . It's a link to the C++ development board on this site. They should be able to give you some help (with the right question).
  23. My eyes are bloodshot also from reading that code...

    My eyes are bloodshot also from reading that code with no '[code]' tags.
  24. Replies
    70
    Views
    5,561

    Is C still a contender? *watches dead...

    Is C still a contender?

    *watches dead programmers turn in thier graves*
  25. Replies
    5
    Views
    2,728

    int high, num, low = 0; while (test condition)...

    int high, num, low = 0;

    while (test condition)
    if (num > high)
    high = num;

    if (num < low)
    low = num;

    //grab next value of num from file, stdin, etc...
Results 1 to 25 of 43
Page 1 of 2 1 2