Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me with writing a simple C++ program

Status
Not open for further replies.

NTFS

Member level 3
Member level 3
Joined
Apr 6, 2004
Messages
66
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
565
challenge: self writer

Hi all

My teacher gave an exercise that I need your help to solve it.

we have to write a program in C++ that print itself (source code).
I mean, the two following commands should have same output:

1) myprog.exe

2) type myprog.cpp

we can't use stream or another file, just we can use C++ instructions like: for , if and etc.

Please guide me to solve it.

Thanks in advance.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top