.cpp and .h files
-
Forgive my ignorance, I am often given small tasks on projects where I have little experience, and not a lot of time for a learning curve on so short a task. I've been asked to make minor mods to a C program. The files I have are .cpp and .h . This is C, as opposed to C++, correct? And I cannot (at least, not effectively) edit and compile this in Visual Studio? (There is no .sln file and the .cpp and .h files do not show up as 'add existing'-able files.) I'm googling for answers about how I'm going to go about this, but most info out there sort of starts at a lower level of info than I'm looking for. I'll probably be back with more questions when I go to compile and such (like where do I get/put all the class libraries and stuff), so any preemptive help on the 'start-to-end' of a C program is appreciated. Thanks. ________________________________________________________________________ Dave Y10K bug! Let's not get caught with our pants down **AGAIN**! (DC 02002)
-
Forgive my ignorance, I am often given small tasks on projects where I have little experience, and not a lot of time for a learning curve on so short a task. I've been asked to make minor mods to a C program. The files I have are .cpp and .h . This is C, as opposed to C++, correct? And I cannot (at least, not effectively) edit and compile this in Visual Studio? (There is no .sln file and the .cpp and .h files do not show up as 'add existing'-able files.) I'm googling for answers about how I'm going to go about this, but most info out there sort of starts at a lower level of info than I'm looking for. I'll probably be back with more questions when I go to compile and such (like where do I get/put all the class libraries and stuff), so any preemptive help on the 'start-to-end' of a C program is appreciated. Thanks. ________________________________________________________________________ Dave Y10K bug! Let's not get caught with our pants down **AGAIN**! (DC 02002)
I'll help you out, although C has little to do with C# .cpp is indeed associated with C++. If you do not have a solution then make one, then add the files in and hope things work. You might want to go to the project settings to configure additional include directory, libraries, and other settings. I cannot help you any further since I dont know what files you are working with. If you need additional help getting things working I suggest you post in the C++ forum. Alex Korchemniy
-
I'll help you out, although C has little to do with C# .cpp is indeed associated with C++. If you do not have a solution then make one, then add the files in and hope things work. You might want to go to the project settings to configure additional include directory, libraries, and other settings. I cannot help you any further since I dont know what files you are working with. If you need additional help getting things working I suggest you post in the C++ forum. Alex Korchemniy
Thanks, yes. I was opening the wrong type of project. Now I just have to figure out why these two files are is missing. The debugger chokes on includes called wx/wxprec.h and stdafx.h. There is a stdafx.h in a subfolder, but adding it to the project doesn't fix the problem. I'm going to take this over to the C++ forum. Thanks for your help. ________________________________________________________________________ Dave Y10K bug! Let's not get caught with our pants down **AGAIN**! (DC 02002) -- modified at 16:45 Thursday 8th September, 2005
-
Forgive my ignorance, I am often given small tasks on projects where I have little experience, and not a lot of time for a learning curve on so short a task. I've been asked to make minor mods to a C program. The files I have are .cpp and .h . This is C, as opposed to C++, correct? And I cannot (at least, not effectively) edit and compile this in Visual Studio? (There is no .sln file and the .cpp and .h files do not show up as 'add existing'-able files.) I'm googling for answers about how I'm going to go about this, but most info out there sort of starts at a lower level of info than I'm looking for. I'll probably be back with more questions when I go to compile and such (like where do I get/put all the class libraries and stuff), so any preemptive help on the 'start-to-end' of a C program is appreciated. Thanks. ________________________________________________________________________ Dave Y10K bug! Let's not get caught with our pants down **AGAIN**! (DC 02002)
DaveC426913 wrote: The files I have are .cpp and .h . This is C, as opposed to C++, correct? No, cpp stands for C++. A C++ program rarely uses .hpp instead of .h. DaveC426913 wrote: And I cannot (at least, not effectively) edit and compile this in Visual Studio? (There is no .sln file and the .cpp and .h files do not show up as 'add existing'-able files.) Try creating a console application and then adding these files to it. Where did these files come from ? Why are you trying to compile them outside of a project, surely they will end up in a project, can't you compile them there ? Christian Graus - Microsoft MVP - C++