C++

program that prints its on source code

Page 1 of 1

2 Replies - 314 Views - Last Post: 06 April 2009 - 11:59 AM Rate Topic: -----

#1 shadow2206  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 06-April 09

C++

Post icon  Posted 06 April 2009 - 06:36 AM

here is the code
i want to create a program that prints its on source code


#include<stdio.h>
#include<conio.h>

#include<stdlib.h>

void main()
{
FILE *fp;
fp=fopen("ss.txt","r+");
system("type H:\TC\BIN\ss.txt")

getch();
}







i saved the above program as ss.c and there is no output.
iam trying to print the text file that compiler creates when a program is saved.or please advice me with another way

This post has been edited by shadow2206: 06 April 2009 - 06:37 AM


Is This A Good Question/Topic? 0
  • +

Replies To: C++

#2 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3089
  • View blog
  • Posts: 19,137
  • Joined: 14-September 07

Re: C++

Posted 06 April 2009 - 06:55 AM

Read me
Was This Post Helpful? 1
  • +
  • -

#3 erik.price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 485
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: C++

Posted 06 April 2009 - 11:59 AM

View PostKYA, on 6 Apr, 2009 - 09:55 AM, said:


Or, alternatively, me!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1