Standard libraries in C / C ++

3

What is the disadvantage of using non-standard libraries such as the getch() function and the conio.h library, what is the drawback of development using such libraries? Speaking more precisely in case of programming in C in microprocessors, web or even software.

I have a poor practice of using non-standard libraries and I do not know what implications it causes in my code.

    
asked by anonymous 12.08.2018 / 23:03

1 answer

3

One that you can not use in other compilers and platforms since few implement this. One of the things people do not understand is that language is something much more than the compiler they installed on their machine, that running on their machine does not mean it will work anywhere.

Of course, it can even use it if you are sure that code will not be used in another situation, ie knowing what you are doing can be done. The problem is that the person uses without knowing, learns wrong and gets used to it. Although I should not worry too much because it is common that people who do this will not continue programming in C or C ++, she is exercising a little out of obligation or liking, but when she starts having a lot of difficulties she will give up language and go in something easier, those who will not give up are usually those who can understand all the concepts of what they are doing and look for a way structure to learn.

So there are people who say programming in C when they program in Borland C which is a dialect of C language. Only those that conform 100% to the default are pure C.

And this is usually a bigger problem because it is usually available in legacy compilers or only maintains it for compatibility, and it is common for these libraries to have security problems either by the specific implementation or even by the concept (it has several standard functions of C that should not be used for this reason).

This question of good or bad practice has to do with this thing of not knowing why things, everything can use if you know why you are doing, and do something that works, but do not know why, should not do. In addition to general reasons, each library has some specific reason not to be used.

In general using C libraries when programming in C ++ is not very suitable and can bring some difficulties. Alias, this is another of the bad things people believe by knowing everything superficially, C ++ is a completely different language from C, but people think not because it can compile almost any C code.

The last sentence of the first paragraph does not seem to make much sense.

What is a programming language, IDE, and compiler? .

    
12.08.2018 / 23:17