Click to See Complete Forum and Search --> : Porting To C++ .NET


Scott MacMaster
March 23rd, 2003, 11:11 PM
I'm working on porting a program from VC++ 6 to C++ .NET. I currently have 2 problems in doing so.

One problem involves the iostream library. My code uses one of the constructor for fstream that takes a file descriptor (as an int). The iostream library in C++ .NET does not seem to have this constructor. How can I instantiate a fstream object using a file descriptor?

The other problem arises because the program uses files in several different folders. One folder is a common folder that contains code used by several programs. I can't seem to find a place in C++ .NET to specify include paths. I could probably deal with this by using macros and other preprocessor commands but any such attempt will require changing a lot of lines of code and require numerous hours of work. I can't believe Microsoft would drop a feature that is practically a requirement for an IDE. Espacially since it would break a lot of programs that is being ported from C++ 6 to C++ .NET. Does someone know how to set include paths in C++ .NET?


Thanks

reena_pramodh
March 24th, 2003, 01:50 AM
If I have understood your query u r talking about how to include certain files in your project say for example .dlls. For this in your solution explorer in the VS.Net IDE right click on your project and select Properties. In the Property Pages dialog box select the C/C++ option. This in turn contains a sort of drop down list. Select General in this. On the right hand side a list of options will be shwon. Select the "Resolve # using references" option. Browse and give the path of all the files that you want to include in your project. Hope this answers your query.

Thanks.

Scott MacMaster
March 24th, 2003, 03:09 AM
Thanks, your suggestion didn't work but it did point me in the direction of what I was looking for. The option I needed was right above "Resolve # using references". It's called "Additional Include Directories"

Any chance you have any thoughts on the problem I have with the iostream library?

Thanks

reena_pramodh
March 24th, 2003, 03:21 AM
Hi,
Sorry even I dunno have any idea about the first problem that you are talking about. Was working on that currently but have not got the solution. Would like to know if u get the solution.

Thanx.