its not completely the same , for example librabries are different and console output statements are different..
what i need to know is , if i input c syntax i should get get corresponding c++ synatx as output
is ther any tool available as such... coz i am thinking of a new project of this sort..
i think u guys didn understand the whole picture..
suppose u have got a c++ prog with 10thousand lines..
and u need to add an extra functionality to the prog, and the same functionality is already done in c, and that is about thosand lines , so if u have a tool as i told , u can convert the c prog and make it completely adapt with the c++ prog
and this is the tool am talkin about
is ther any concept of this sort
If you have the 'extra functionality' compiled in C, you may have to say extern"C" in the header files you include to have it working. If you have the 'extra functionality' sourcecode you can compile it in C++ as it is mostly compatible with C
okey.. i was thinking is to develop a program which takes c syntax as input in a file and parse the same c syntax and producing the corresponding c++ synatx in another file
how does it sound?
you can easily replace stdio.hiostream by parsing a bit the input.
(in C++ main should be of type int )
in this example is not so difficult transforming line 5 but it would be harder if you had some variables to output
mr bazzy, i guess u got the point, the above was jus an example, i was talkin about converting any program written in C
have u ever heard of any thing related to this..