Cpp and h files in one folder?

Asked 2 years ago, Updated 2 years ago, 45 views

I don't know if it's okay to ask questions like this, but I'm asking because I'm curious about which one is mainly used.

In a large project, for example, if you create a class A, you create an A.cpp, A.h file, and you put these two files in one folder to manage them Create folder A in the source folder, and create folder A in the header folder to manage it.

It's a really useless question, but there's no place to ask, so I'm posting a question. Is this also a method of separation according to individual tendencies?

if
{

}

if {

} With?

file

2022-09-21 21:36

1 Answers

As far as I know, C, C++ is so indivisible that .cpp and .h have to be in the same path.

https://github.com/antirez/redis/tree/unstable/src

The above is the source code for a project called Redis, which is C language, but has c file and h file together.


2022-09-21 21:36

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.