Search:

Type: Posts; User: oomen3

Search: Search took 0.01 seconds.

  1. Thread: stdin question

    by oomen3
    Replies
    6
    Views
    2,917

    [oomen@localhost]./program < data the data is...

    [oomen@localhost]./program < data

    the data is not command line argument but "<" send the data to the program as input stream
  2. Thread: stdin question

    by oomen3
    Replies
    6
    Views
    2,917

    no actualy I want something something like this ...

    no actualy I want something something like this

    ./program < data // from command promt

    while (!feof(stdin){
    printf("%c",getc(stdin));
    }

    return to beginning of stdin.
  3. Thread: stdin question

    by oomen3
    Replies
    6
    Views
    2,917

    thanks

    thanks
  4. Thread: stdin question

    by oomen3
    Replies
    6
    Views
    2,917

    ok, then how do I return to the beginning of...

    ok, then how do I return to the beginning of stdin
    rewind(stdin);
    doest work
  5. Thread: stdin question

    by oomen3
    Replies
    6
    Views
    2,917

    stdin question

    hello!

    I want to use stdin twice. Is it possible at all? For example, when I use stdin

    while(!feof(stdin)) printf("%c", getc(stdin));

    and now does the stdin exist in the memory anymore?
    ...
  6. Replies
    4
    Views
    1,896

    string str("234"); int var=atoi(str); gives...

    string str("234");
    int var=atoi(str);

    gives compiler error because it can handle only
    char arrays;

    I find that stringstream is useful.
  7. Replies
    4
    Views
    1,896

    converting string to int

    Hello!
    How to convert string to int?
    Is there any standart function for this.
    atoi() doesn't work. one way is to convert string to char array and then atoi().
    is there something short like
    int...
  8. Replies
    4
    Views
    1,154

    sry I pushed the button too early:)

    sry
    I pushed the button too early:)
  9. Replies
    4
    Views
    1,154

    array of objects

    class BASE{
    public:
    int x;
    int y;
    int c;
    void print(void){cout<<"base";}
    };

    class CHILD1 : public BASE{
    void print(void){cout<<"child1";}
  10. Replies
    4
    Views
    1,154

    array of objects

    class Base{
    public:
    int x;
    int y;
    };

    class
  11. Replies
    4
    Views
    1,394

    thanks, know I know:)

    thanks, know I know:)
  12. Replies
    4
    Views
    1,394

    thank you for answering but I have some questions...

    thank you for answering but I have some questions more.


    int* ChangeNumber(int *Num){
    int i = 0;
    for(i=0;i<10;i++){
    Num[i] = i;
    }
    return Num;
    }
  13. Replies
    4
    Views
    1,394

    returning array?

    how to do it?

    int[] func(int x); // doesn't work

    []int func(int x); // doesn't work

    int[3] func(int x); // doesn't work

    is there any solution?
Results 1 to 13 of 13