Search:

Type: Posts; User: sworc66

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Thread: invalid input

    by sworc66
    Replies
    8
    Views
    5,216

    and if i enter 7hello for example. it prints out...

    and if i enter 7hello for example. it prints out seven.
  2. Thread: invalid input

    by sworc66
    Replies
    8
    Views
    5,216

    This catches the invalid input but wont print out...

    This catches the invalid input but wont print out the number now when it is valid input.


    int res;
    int num;
    int pos;
    /* res = sscanf( cmd, "%d", &num); */
    res =...
  3. Thread: invalid input

    by sworc66
    Replies
    8
    Views
    5,216

    It wouldnt catch out all the invalid input by...

    It wouldnt catch out all the invalid input by saying if theres any more chars after [3] its invalid input. How do i get it to catch it out if say the user entered: 56hj for example?
  4. Thread: invalid input

    by sworc66
    Replies
    8
    Views
    5,216

    But theres a possibility that theres trailing...

    But theres a possibility that theres trailing chars, coz the numbers go up to 1000. I basically need to say that if a number inst entered its invalid input dont i? how do i go about doing that?
  5. Thread: invalid input

    by sworc66
    Replies
    8
    Views
    5,216

    invalid input

    I need my program to output a message "invalid input" when the input is not correct by the user.

    Currently my programs use is to allow the user to enter a number and the program outputs that...
  6. Replies
    4
    Views
    1,531

    breaking out of program

    In regards to the default case, i need the prog to only end if there is no input. If i put return 0; the prog ends only after one loop, and if i put break; the prog never ends.

    Can anyone tell me...
  7. Replies
    3
    Views
    2,375

    shrinking the stack

    Why doesnt the UNIX Kernel shrink the stack?
  8. Replies
    3
    Views
    2,922

    undefined symbol

    Im getting an error that says

    >Undefined first referenced
    > symbol in file
    >
    >stricmp num.o


    when i test...
  9. Thread: makefile

    by sworc66
    Replies
    2
    Views
    1,993

    makefile

    I get the message: makefile:6: *** missing separator. Stop.

    Whats wrong with my makefile?
  10. Thread: parse error

    by sworc66
    Replies
    3
    Views
    1,294

    I dont have a book yet, i have one on order and...

    I dont have a book yet, i have one on order and im waiting for it to arrive.
  11. Thread: parse error

    by sworc66
    Replies
    3
    Views
    1,294

    In regards to the user inputting words, how do i...

    In regards to the user inputting words, how do i go about that, should i use strstr or what?


    int two(){

    char word;

    scanf("%s", &word );
    switch(word){
    ...
  12. Thread: parse error

    by sworc66
    Replies
    3
    Views
    1,294

    parse error

    Im getting an error and i dont know what i need to do to fix it. Also can anyone let me know if im doing the right thing here. I want my program to read from input either numbers or words and convert...
  13. Replies
    25
    Views
    2,767

    I have had a look at what the FAQ has to say...

    I have had a look at what the FAQ has to say about strcmp() but i still dont really know how i use it, or even if its what i need to use. I need to be able to look at whole words and not just...
  14. Replies
    25
    Views
    2,767

    how come my or doesnt work? #include...

    how come my or doesnt work?


    #include <stdio.h>

    int len;

    int i;

    int main()
  15. Replies
    25
    Views
    2,767

    Ok i see how i use the gets, but how do i specify...

    Ok i see how i use the gets, but how do i specify what i want it NOT to print out. Is it like what i did in the code in my last post or how so i do it. If you could point me to a tute that explains...
  16. Replies
    25
    Views
    2,767

    this isnt working but am i on the right track...

    this isnt working but am i on the right track with this?


    #include <stdio.h>


    int main()

    {
  17. Replies
    25
    Views
    2,767

    am i able to use scanf to read characters from...

    am i able to use scanf to read characters from input and then only print certain things back to output? How do i specify what i want it to print back out. For example if i only want it to print...
  18. Replies
    25
    Views
    2,767

    ok can you explain what a prototype is in simple...

    ok can you explain what a prototype is in simple terms for me plz.
  19. Replies
    25
    Views
    2,767

    i get this error: bash-2.02$ gcc -o ass ass.c...

    i get this error:

    bash-2.02$ gcc -o ass ass.c
    ass.c:47: warning: type mismatch with previous implicit declaration
    ass.c:43: warning: previous implicit declaration of `one'
    ass.c:47: warning:...
  20. Replies
    25
    Views
    2,767

    I can only seem to find c++ tutes on this site......

    I can only seem to find c++ tutes on this site... anyways... here is the start of what ive done. Can you show me using my code how to refer to functions outside of main() because i want to add more....
  21. Replies
    25
    Views
    2,767

    THanks everyone, its been great help. In regards...

    THanks everyone, its been great help. In regards to main() i just need a simple explination as to how i write functions outside of the main and then refer to them in the main. At the moment i really...
  22. Replies
    25
    Views
    2,767

    This works ok. How do i make it so that you can...

    This works ok. How do i make it so that you can input different arguments instead of having them set when i run the program.. like i want to be able to enter values when i execute it if you know what...
  23. Replies
    25
    Views
    2,767

    what im trying to do is get the program to print...

    what im trying to do is get the program to print the numbers in ascending order. How do i get the program to go to the swap part from main? Im not really understanding how to do things separatly from...
  24. Replies
    25
    Views
    2,767

    if else problem

    When im doing an if and then an else, and i want the else to be a "do nothing". How do i do that and can i have an example?
    thanks :)
  25. Thread: cant find bugs

    by sworc66
    Replies
    5
    Views
    1,553

    yep it works. thanks heaps guys.

    yep it works. thanks heaps guys.
Results 1 to 25 of 52
Page 1 of 3 1 2 3