The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> C Programming
|
syntax to open a *.txt file
Discuss syntax to open a *.txt file in the C Programming forum on Dev Shed. syntax to open a *.txt file C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

July 7th, 2002, 07:11 AM
|
 |
Contributing User
|
|
Join Date: Jul 2001
Location: world
Posts: 293
Time spent in forums: 4 h 31 m 47 sec
Reputation Power: 12
|
|
|
syntax to open a *.txt file
hi,
what is the syntax to open a *.txt file from within the program ?
actually my output gets saved in a *.txt file,
i want it to pop-up after i have run my program
thanks,
|

July 7th, 2002, 02:25 PM
|
 |
Throws Rocks
|
|
Join Date: Mar 2002
Location: Cincinnati, Ohio
Posts: 392
  
Time spent in forums: 6 h 31 m 7 sec
Reputation Power: 13
|
|
|
more info
perhaps you could include more info: - what language
- what compiler
- what system architecture
- stream oriented or not
no offense, but i would think after the number of posts that you have, you would be able to post a thread in a much better manner.
__________________
Two things have come out of Berkeley, Unix and LSD.
It is uncertain which caused the other.
|

July 7th, 2002, 08:55 PM
|
 |
Contributing User
|
|
Join Date: Jul 2001
Location: world
Posts: 293
Time spent in forums: 4 h 31 m 47 sec
Reputation Power: 12
|
|
|
sorry,
yah
Language - Visual C++
Compiler - Visual C++
system architecture - none or not known
Not stream oriented
actually this post is for a friend.
thanks,
|

July 7th, 2002, 11:39 PM
|
 |
Throws Rocks
|
|
Join Date: Mar 2002
Location: Cincinnati, Ohio
Posts: 392
  
Time spent in forums: 6 h 31 m 7 sec
Reputation Power: 13
|
|
Quote: Originally posted by darcher
system architecture - none or not known |
rofl @ none or not known.
if you're running Visual C++, it's obviously x86.
since it's not stream oriented, i'm guessing he or she might be using functions like fopen, fclose, fprintf, fscanf, fgets, or fputs. any of those look familiar?
why can't your 'friend' post his or her own problems (or solve them even)? also, why don't you just post up your 'friends' source code? that would provide much more insight to the problem.
|

July 8th, 2002, 07:43 AM
|
 |
/(bb|[^b]{2})/
|
|
Join Date: Nov 2001
Location: Somewhere in the great unknown
|
|
If I am understanding your request correctly, before you end your program send a command to the command-interpreter by using the system function. i.e.
Code:
#include <process.h>
int main()
{
system( "notepad yourfile.txt" );
return 1;
}
You can find info on this in the msdn.
|

July 8th, 2002, 03:53 PM
|
|
Contributing User
|
|
Join Date: Jun 2002
Posts: 36
Time spent in forums: < 1 sec
Reputation Power: 11
|
|
|
sorry for going off topic here but where can you get msdn?
|

July 8th, 2002, 04:04 PM
|
 |
/(bb|[^b]{2})/
|
|
Join Date: Nov 2001
Location: Somewhere in the great unknown
|
|
For the online reference:
http://msdn.microsoft.com
But you should have also gotten the help library from the cd bundle that came with the Visual Studio.
There are 2 cds with about 1 gig of help info.
|

July 9th, 2002, 07:36 PM
|
 |
Contributing User
|
|
Join Date: Jul 2001
Location: world
Posts: 293
Time spent in forums: 4 h 31 m 47 sec
Reputation Power: 12
|
|
|
Thanks OnSlaught, that worked,
now how could i close that notepad file after a few minutes ?
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|