Answer the question
In order to leave comments, you need to log in
Is it allowed to use C functions in C++?
I don't know much yet, so this might be a dumb question. Is it bad form to use functions from C in C++ programs? Are there any downsides to using such functions? I asked this question because I needed to get the current date, but using functions from the C library, the compiler said that using a function / variable could be unsafe and suggested using another one. For a detailed explanation or links to articles (English or Russian), a separate huge thank you.
Answer the question
In order to leave comments, you need to log in
You can talk for a long time about bad style or the difference between programming paradigms.
You can holivar, or you can know that no one will ever see 90% of the code.
You can also remember that the author himself called C ++ "C with classes".
So yes, you can.
Yes, you can, there is even a style where C++ does not use C++, only from c.
Although C++ has already gone far from "C to classes", but it is possible, compilers are backwards compatible. Just be careful.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question