Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. .cpp and .h files

.cpp and .h files

Scheduled Pinned Locked Moved C#
c++helpcsharpvisual-studioquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DaveC426913
    wrote on last edited by
    #1

    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)

    A C 2 Replies Last reply
    0
    • D DaveC426913

      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)

      A Offline
      A Offline
      Alex Korchemniy
      wrote on last edited by
      #2

      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

      D 1 Reply Last reply
      0
      • A 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

        D Offline
        D Offline
        DaveC426913
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • D DaveC426913

          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)

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          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++

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups