Search:

Type: Posts; User: frrossk

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    1,215

    Look for fscanf()

    Look for fscanf()
  2. Replies
    1
    Views
    979

    Check itoa(), sprintf()

    Check itoa(), sprintf()
  3. Replies
    32
    Views
    8,781

    Continuing play? >>27. What is the difference...

    Continuing play?
    >>27. What is the difference between "calloc" and "malloc"?
    First begins with 'c', the second with 'm'. Good enough? :D
  4. Replies
    8
    Views
    1,081

    >>and it doesn't do the same thing as clrscr(),...

    >>and it doesn't do the same thing as clrscr(), because clrscr() will actually clear the screen and start you printing back at the top. your way will have you printing at the bottom.
    I know; I was...
  5. Replies
    8
    Views
    1,081

    You have 2 lines of code: ...

    You have 2 lines of code:


    ......................
    cout << endl << endl << endl << endl << endl << endl << endl;
    ......................
    cout << endl << endl << endl << endl<< endl << endl <<...
  6. Replies
    8
    Views
    1,081

    Missing first time...What are you using that file...

    Missing first time...What are you using that file (fout.open ("prompt.txt");) for???
  7. Replies
    8
    Views
    1,081

    First, don't #include , as it's not...

    First, don't #include <conio.h>, as it's not standard header. And quit using clrscr(). You need to use


    #include <fstream>
    #include <iomanip>
    #include <iostream>
    #include <math.h>

    2nd,
  8. Thread: Relativity

    by frrossk
    Replies
    24
    Views
    13,286

    What will be the point of view of a person...

    What will be the point of view of a person standing between ball and hole? :D
  9. Replies
    13
    Views
    1,409

    I think you should take a look here: functions...

    I think you should take a look here: functions
  10. Replies
    13
    Views
    1,409

    You mean to pass the value returned by the...

    You mean to pass the value returned by the function() to a new function called calculate()?
    Something like this, maybe?


    #include <stdio.h>

    //declare functions
    int function(void);
    int...
  11. Replies
    7
    Views
    6,323

    Strange... I tried your program in my compiler...

    Strange... I tried your program in my compiler (Dev-cpp 4.9.9.0) and I don't get any seg fault...
  12. Replies
    11
    Views
    1,823

    Try this: double getBalance(float p, float...

    Try this:


    double getBalance(float p, float i, float q, int n)
    {
    return (p* pow ( (1+ (i / q)),(n * q)));
    }

    It's working OK for me...
  13. Replies
    4
    Views
    927

    Read this...

    Read this .
  14. Replies
    11
    Views
    1,823

    I think your formula for calculate the balance is...

    I think your formula for calculate the balance is getting to pretty big numbers (that get beyond the range for floating numbers in C). Declare double getBalance(float p, float i, float q, int n); and...
  15. Replies
    4
    Views
    1,535

    Maybe something like this:...

    Maybe something like this: http://www.mpeg.org/MSSG/#dos?
  16. Replies
    6
    Views
    1,128

    I guess you want something like this: int...

    I guess you want something like this:


    int SkiptoEndofLine()
    {
    while (readchar()!='\n')
    {
    ;
    }
    }
  17. Replies
    6
    Views
    1,128

    Why don't you read a line at once form the file...

    Why don't you read a line at once form the file and process every char in that line until you need to skip to the next line? Wouldn't be simpler this way?
  18. Replies
    6
    Views
    1,128

    How do you read from the file? Some code...

    How do you read from the file? Some code...
  19. Replies
    3
    Views
    1,202

    Something like this: if (strchr...

    Something like this:


    if (strchr (entry->d_name, '.') == NULL)
    printf ("%*s%s/\n",depth,"",entry->d_name);

    ??
  20. Replies
    10
    Views
    11,925

    >>char to int atoi or strtol functions...

    >>char to int
    atoi or strtol functions (stdlib.h)

    >>int to char
    sprintf, snprintf (stdio.h)
  21. Replies
    10
    Views
    48,621

    In function char *check_str(char *string2): ...

    In function char *check_str(char *string2):


    char *check_str(char *string2)
    {
    char string3[]="abc";

    strcat(string2,string3);
    return char string2[40];
    }
  22. Replies
    10
    Views
    48,621

    >>void main(void) Always use int main() ...

    >>void main(void)
    Always use int main()

    >>void check_str(char);
    As you defined this function, it should retun a string, and it gets a parameter that is a string, so it should be char*...
  23. Replies
    6
    Views
    1,388

    www.bloodshed.net - an example For more, check...

    www.bloodshed.net - an example
    For more, check http://www.compilers.net/Dir/Free/Compilers/CCpp.htm
  24. Replies
    6
    Views
    1,388

    What's not clear? Your compiler is a DOS-based...

    What's not clear?
    Your compiler is a DOS-based one (pretty old); you should use a newer one...
  25. Replies
    21
    Views
    3,056

    >>getchar is a nonporatble method getchar() is...

    >>getchar is a nonporatble method
    getchar() is defined in ANSI-C and is supported under Windows and Linux (I never played with MacOS, so I don't count it), and is nonportable? I'd like a bet... :D
Results 1 to 25 of 25