Search:

Type: Posts; User: andor

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Help, Again.

    by andor
    Replies
    4
    Views
    785

    And where are the brackets after the loop and the...

    And where are the brackets after the loop and the sum?
  2. Replies
    3
    Views
    3,670

    The program is simple but conio.h is not standard...

    The program is simple but conio.h is not standard library so the function getch() also is not standard. Remove the included library and instead of getch() use getchar().
  3. Replies
    5
    Views
    1,628

    Asume that you define function like this: ...

    Asume that you define function like this:


    int foo(void *);

    than you can pass to function different number of arguments. Okay its only one real argument but void * can point to array of...
  4. Replies
    10
    Views
    1,478

    int main() { /* your code going here */ ...

    int main()
    {
    /* your code going here */
    return 0;
    }

    Did you try to write something? Well you should read char by char and find out some logic to convert it to decimal
  5. Replies
    30
    Views
    4,312

    link (http://c-faq.com/fp/fpequal.html)

    link
  6. Replies
    5
    Views
    42,574

    I meant getch is not standard

    I meant getch is not standard
  7. Replies
    5
    Views
    42,574

    No its not standard. Use getchar instead

    No its not standard. Use getchar instead
  8. Replies
    7
    Views
    1,113

    response

    try


    plyr = &pone;
  9. Thread: Newbie need help

    by andor
    Replies
    2
    Views
    1,066

    this is wrong scanf("%s", &selection); use...

    this is wrong
    scanf("%s", &selection); use this instead


    getchar(); /* kludge */
    selection = getchar();

    becouse selection is single char. Read this. When you use switch always use also...
  10. Thread: Current Project

    by andor
    Replies
    2
    Views
    1,138

    Yes I think splitting the chars of the input is...

    Yes I think splitting the chars of the input is good idea. To recognise capitals you can use funcs as islower or isupper in ctype.h header. So if there is no space (' ') between chars than its OR,...
  11. Replies
    7
    Views
    41,734

    Instead of strlen in loop, calculate the length...

    Instead of strlen in loop, calculate the length of cur in front of the loop.
  12. Replies
    6
    Views
    2,247

    I agree.

    I agree.
  13. Replies
    7
    Views
    1,719

    Your code doesn't compile without errors.

    Your code doesn't compile without errors.
  14. Thread: Rsa?

    by andor
    Replies
    3
    Views
    1,237

    Don't tell me that you searched the internet and...

    Don't tell me that you searched the internet and you did't find any source code.
  15. Thread: education

    by andor
    Replies
    8
    Views
    2,891

    >have tried for 3 years to learn everything about...

    >have tried for 3 years to learn everything about c

    >i have succeeded nothing. i cant even print simple phrases

    One of these two is false.
  16. Replies
    5
    Views
    3,459

    Its declared as static.

    Its declared as static.
  17. Replies
    5
    Views
    3,459

    You need to declare the inarg (for example after...

    You need to declare the inarg (for example after static declaration
    int inarg(char);) func or define it before gettok func.
  18. Thread: ASCII Table

    by andor
    Replies
    21
    Views
    8,967

    There are 255 of them plus NULL. So from 0 to...

    There are 255 of them plus NULL. So from 0 to 256. You can printf like printf("%c %d 0x%x\n", i, i, i); in aloop afcourse.
  19. Thread: array help:help

    by andor
    Replies
    3
    Views
    905

    link...

    link
  20. Replies
    17
    Views
    2,954

    Or easier #include int main()...

    Or easier


    #include <stdio.h>

    int main()
    {
    char crap[2] = {'1', '3'};
    int total = 0;
    int i;
  21. Replies
    17
    Views
    2,954

    U forgott just a little thing #include...

    U forgott just a little thing


    #include <stdio.h>
    #include <stdlib.h>
    int main()
    {
    char tmp[2] = {'\0', '\0'};
    char crap[2] = {'1', '3'};
    int total = 0;
  22. Replies
    17
    Views
    2,954

    No. But U can do like this char tmp[2] =...

    No. But U can do like this


    char tmp[2] = {'\0', '\0'};
    for (i=0; i< length; i++)
    {
    tmp[0] = crap[i];
    total += atoi(tmp);
    }
  23. Replies
    17
    Views
    2,954

    watch the Ascii table and U will understand. '0'...

    watch the Ascii table and U will understand. '0' is char and it's 0x30 in ascii and crap[0] is '1' also char and in ascii represantation is 0x31. Substracting the two U get the right result
  24. Replies
    17
    Views
    2,954

    U mean something like this #include...

    U mean something like this


    #include <stdio.h>
    int main()
    {
    char crap[] = "123";
    int biggerCrap = crap[0] - '0';
    printf("\n%d\n", biggerCrap);
    return 0;
  25. Replies
    17
    Views
    2,954

    printf("\n%d\n", crap[0] - '0');

    printf("\n%d\n", crap[0] - '0');
Results 1 to 25 of 44
Page 1 of 2 1 2