Hi,
Can anyone give me a proper defination of copy-on-write with implementation of the same.
I just know that "when one process is writing to some data, the other process which wants to read the same data should wait. Once the first process completes writing the other process can perform its operation".
I'm I correct, If no, please let me know about that in detail. If possible explain using programming....
User Profile
Collapse
-
Please elaborate, I'm unable to get what you meant. -
-
You can still try out this,
istringstream is defined in <sstream> header fileCode:string line = "first.txt"; istringstream is(line);
Leave a comment:
-
Hi aspoline,
I have sent you the working code. Try this out.
It works fine as you want
...Code:char* str = new char[100]; char* temp = str; char* read = new char[strlen(str)+1]; cout<<"Enter the string"<<endl; cin>>temp; int count = 0, i=0; char* p = &temp[0]; while(*temp && p++) { read[i++] =Leave a comment:
-
...Code:char* str = new char[100]; char* temp = str; char* read = new char[strlen(str)+1]; cout<<"Enter the string"<<endl; cin>>temp; int count = 0, i=0; char* p = &temp[0]; while(*temp && p++) { read[i++] = *temp; if(*temp == *p) { count++; temp++; continue; }Leave a comment:
No activity results to display
Show More
Leave a comment: