Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
c++ x 13
c x 2
Member Avatar for vyrte

i'm writing a program in c++ using linux and i face the following issue: i want to tell the difference between a hard link and a file,given a path. To be more specific, i consider that it is the file itself when there's only one hard link pointing to the …

Member Avatar for BobS0327
0
183
Member Avatar for vyrte

hello everyone! i'm writing a program where i want to choose a random double but not greater than "i" which is a specific value --lets say 60--i'm doing the following: [CODE]double b = rand()%i+1[/CODE] and i get the error while compiling : [I][U]invalid operands of types 'int' and 'double' to …

Member Avatar for vyrte
0
235
Member Avatar for vyrte

hello everyone! i'm writing a program using linux environment and i'm curious about the use of waitpid().i have searched the command on google but i'm not sure i understood the return values of the command. for example i want to use it as follows: [CODE]if(waitpid(-1,&status,WNOHANG )>0) sum++; [/CODE] where sum …

Member Avatar for Ancient Dragon
0
127
Member Avatar for vyrte

hello everyone! i'd like to know if theres a way to run my program until the user presses Esc button. i use linux environment and my main function runs fork().i want the program to stop the fork() when the user presses escape. thank you!

Member Avatar for WaltP
0
171
Member Avatar for vyrte

hello i'm writing a program in c++ and i'm using linux. i use fork() in order to create a process and then i want to wait for the child process to finish so its something like that: [CODE]pid=fork(); if(pid<0) { cerr << "Failed to fork" << endl; exit(1); } if(pid==0){ …

Member Avatar for iamthesgt
0
438
Member Avatar for vyrte

hello! i have a problem with my code,it keeps crashes at the following point: [CODE] [B]a.h[/B] class Value{ ..... public: Value(char* b); } class A{ private: ....... Value* value; ........ public: A(char* tok); } a.cpp A::A(char* tok){ ....... *value = Value(tok) ......} [/CODE] i can tell i do something wrong …

Member Avatar for Moschops
0
125
Member Avatar for vyrte

hello everyone! i have a question about reading from a binary file.what if i want to start reading a file from a certain line of the file and end the reading to a certain line too? is there a way to do this using an ifstream?

Member Avatar for WaltP
0
165
Member Avatar for vyrte

hello i have a problem in reading lines from a file.i use the following code and the printf returns null. [CODE] char* x; MAXLINE =100; char line[MAXLINE]; FILE *source; source = fopen("data.txt","r"); if (source == NULL){ printf("ERROR!!!file not found!");} while(!feof(source)){ x = fgets(line,MAXLINE,source); printf("%s\n",x);} fclose(source); [/CODE]

Member Avatar for Ancient Dragon
1
93