![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Opening a Unix File in Windows. | a439511 | UNIX for Dummies Questions & Answers | 6 | 03-07-2008 05:13 AM |
| Opening a TCPIP Port with UNIX C | DaveBarber | High Level Programming | 3 | 04-16-2007 07:55 AM |
| How do I choose the application when opening a file in UNIX? | Mpeter | OS X (Apple) | 2 | 10-27-2006 05:48 AM |
| Opening an Excel File in Unix | bubeshj | UNIX for Advanced & Expert Users | 5 | 08-03-2006 08:03 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Pls someone help me. This piece of code is giving me weird results.
ofstream outfile; ofstream out; char filename1[72]; char filename2[72]; memset(filename1,'\0',sizeof(filename1)); memset(filename2,'\0',sizeof(filename2)); strcpy(filename1,"Testing1.out"); strcpy(filename2,"Testing2.out"); cout << filename1 << filename2; outfile.open(filename1,ios: ut);cout << filename1; out.open(filename2); cout <, filename2; The problem here is the first time I print filename1, the value is shown correctly, but after .open, the filename has become null. I get a file create error also. Whereas the filename2 has no problems. I have tried opening filename1 in out and app modes, with binary without binary etc without success. I have to create the filename1. Does anybody have any clue as why this is happening? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|