[oomen@localhost]./program < data
the data is not command line argument but "<" send the data to the program as input stream
Type: Posts; User: oomen3
[oomen@localhost]./program < data
the data is not command line argument but "<" send the data to the program as input stream
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.
thanks
ok, then how do I return to the beginning of stdin
rewind(stdin);
doest work
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?
...
string str("234");
int var=atoi(str);
gives compiler error because it can handle only
char arrays;
I find that stringstream is useful.
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...
sry
I pushed the button too early:)
class BASE{
public:
int x;
int y;
int c;
void print(void){cout<<"base";}
};
class CHILD1 : public BASE{
void print(void){cout<<"child1";}
class Base{
public:
int x;
int y;
};
class
thanks, know I know:)
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;
}
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?