I got an error if I make 2 file of c++

Question:

Repl link/Link to where the bug appears:
https://replit.com/@Satyamkan10/C?v=1
Screenshots, links, or other helpful context:

#include <iostream>

int main() {
    std::cout << "Hello, Replit!" << std::endl;
    return 0;
}

Hi @Satyamkan10 , welcome to the forums!
You cannot have 2 .cpp files.
If you want more than one, though, use .hpp files instead.

2 Likes