Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 13-03-2010, 12:57 PM   #1 (permalink)
Right Off the Assembly Line
 
openSUSE's Avatar
 
Join Date: Sep 2009
Location: Pune
Posts: 10
Question write a c prgm to delete comments in any c prgm....


Hi ....Frendz'........
plz guide me to write this prgm.......
openSUSE is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 14-03-2010, 07:46 PM   #2 (permalink)
In The Zone
 
vandit's Avatar
 
Join Date: May 2005
Location: If I had a webcam u could have seen me, before your eyes.
Posts: 459
Default Re: write a c prgm to delete comments in any c prgm....

1. Just open the file in the read-write + Binary mode using the File management functions.
2. read the lines from the files (check for newline character)
3. search for double-slashes and delete them(or replace them with a space ).
__________________
Searching for dell studio 15 ??
dell studio 15 review @ my blog

vandit007.blogspot.com

And remember the stylus that comes along with the touchscreens isnt meant for cleaning your ears !!
vandit is offline  
Old 14-03-2010, 09:09 PM   #3 (permalink)
Evil mind
 
jxcess3891's Avatar
 
Join Date: Jan 2009
Posts: 59
Default Re: write a c prgm to delete comments in any c prgm....

Quote:
Originally Posted by openSUSE View Post
Hi ....Frendz'........
plz guide me to write this prgm.......
char = store chars of files in array;
while (!EOF){
if (char == '/*') {

while (*char++ != '/*') {

delete char; :-P
char ++;
}

}
delete char;
}

This is the logic. My syntax is not good but u can work on it.
__________________
Sallu baba is still not married coz he's gay!!!
jxcess3891 is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
write C prgm to delete comments in in any C prgm openSUSE Programming 3 09-05-2010 10:42 PM
Due Kernel I/O error, system refuses to boot randomly gary4gar Open Source 33 04-05-2008 10:22 AM
Please Help Out Guys Official Techie QnA (read only) 2 05-05-2007 02:08 PM
Problem in writing DVD gau_pppu Software Q&A 8 09-04-2007 10:34 AM
How to use flashget in opera 8 Gaurav Software Q&A 6 22-10-2005 11:19 PM

 
Latest Threads
- by Charan
- by Charan
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 03:15 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2