---
title: "Discussion on \"Using .h and .cpp files in an online C++ compiler (and why most of them fail)\" | Hashnode"
description: "Discussion on \"Using .h and .cpp files in an online C++ compiler (and why most of them fail)\". Why #include \"Student.h\" fails in one-file online compilers, three ways to run .h and .cpp files together, and what each linker error means."
url: "https://hashnode.com/posts/using-h-and-cpp-files-in-an-online-c-compiler-and-why-most-of-them-fail/6af18bb0b75e752ee44d45ec"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using .h and .cpp files in an online C++ compiler (and why most of them fail)](https://ashwin31.hashnode.dev/using-h-and-cpp-files-in-an-online-c-compiler-and-why-most-of-them-fail?utm_source=hashnode&utm_medium=feed)

Why #include "Student.h" fails in one-file online compilers, three ways to run .h and .cpp files together, and what each linker error means.

6d ago · 7 min read · ashwin31.hashnode.dev  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[Aswani Kumar](https://hashnode.com/@ashwin31)

@ashwin31 · Hyderabad, India

  
[View profile](https://hashnode.com/@ashwin31)

I'm the founder of FurryPari.com, bottlecrm.io, RunCode.io and MicroPyramid.com, with over 13 years of experience in building scalable software solutions, leading product innovation, and mentoring engineering teams. I specialize in cloud development, DevOps, and AI-driven automation tools.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
