What header files do I need for my code to run in Microsoft Visual Studio?

  • Thread starter sweetjones
  • Start date
  • Tags
    File
In summary, a header file is a file that contains declarations of functions, variables, and data structures used in a C or C++ program. It allows for the separation of declarations and implementation, facilitates code sharing, and is included in source code files using the preprocessor. Common header files used in C and C++ include stdio.h, stdlib.h, string.h, math.h, and time.h, and we can create our own header files by declaring our own functions and data types.
  • #1
sweetjones
44
0
Hello, I'm trying to copy and paste my code into Microsoft Visual C++. It's originally written in Borland. I rearranged my header files' format to fit Microsoft's format, but some headers aren't being read. Is there a list that has ever possible header file that exist for Microsoft Visual Studio? Thanx in Advance!
 
Technology news on Phys.org
  • #2
Go to this directory, and list the files:


\Program Files\Microsoft Visual Studio 8\VC\include
 
  • #3


Hello there,

Thank you for reaching out. Unfortunately, there is no single list that contains every possible header file for Microsoft Visual Studio. The headers needed for a specific project can vary depending on the libraries and frameworks being used.

I would recommend checking the documentation for the libraries and frameworks you are using and making sure that you have included all the necessary header files. You can also try searching online for any specific headers that may be missing.

Additionally, if you are still having trouble getting your code to run in Microsoft Visual Studio, you can try reaching out to their support team for assistance.

I hope this helps. Best of luck with your project!
 

1. What is a header file?

A header file is a file that contains declarations of functions, variables, and data structures that are used in a C or C++ program. It is typically included at the beginning of a source code file and provides information about the functions and data types used in the program.

2. Why do we need header files?

Header files allow us to separate the declaration of functions and data types from the implementation, making our code more organized and readable. It also enables us to share code between different source code files without having to rewrite the same declarations.

3. How do header files work?

When a header file is included in a source code file, the preprocessor replaces the #include directive with the contents of the header file. This allows the compiler to have access to the declarations of functions and data types defined in the header file during the compilation process.

4. What are the common header files used in C and C++?

Some common header files used in C and C++ include stdio.h, stdlib.h, string.h, math.h, and time.h. These header files contain declarations for commonly used functions and data types, such as I/O operations, memory management, string manipulation, mathematical operations, and time-related functions.

5. Can we create our own header files?

Yes, we can create our own header files by declaring our own functions and data types and saving them in a file with the .h extension. These header files can then be included in our source code files using the same #include directive.

Similar threads

  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
16
Views
1K
Replies
15
Views
4K
  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
9
Views
15K
  • Programming and Computer Science
Replies
9
Views
3K
  • Programming and Computer Science
Replies
2
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
4K
Replies
2
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
Back
Top