Simulating Typing in C

Started by
11 comments, last by BitMaster 8 years, 10 months ago

I would highly recommend using std::string, [it's much safer]

[Why] C and not [C++]?

[C++ nit-picking]

[C++ nit-picking]

"Why are you using C strings in your C program? You should use C++ strings in a C++ program instead." Ugh. OP is learning C, not C++.

How about we suggest that he use Java instead? Java is far safer than C++, because exceptions, virtual environment, and other fun stuff.


/rant

194449.jpg

Shogun.

Advertisement

Questioning the decision to learn C is a pure self defense mechanism, because:

a) on this forum alone, several people only learn C as a "first step" towards C++ due to the misconception that it makes any kind of sense

b) too many people starting with C pick up bad programming habits and never drop them after moving on to C++ which

c) leads to lots of frustration when your job mostly consists of debugging and/or reviewing code of "C first"-coworkers.

So, what isn't legitimate to question the motivation behind learning the programming equivalent of Latin (I doubt we're talking about C99 or even C11)? Unless C itself is the long term goal and the job involves embedded platforms and ancient compilers, the OP might very well be wasting time with a counter productive endeavor.

f@dzhttp://festini.device-zero.de

for C++, it's text.size(), not text.length(). Please try and not give incorrect information in the beginner's section, it's already confusing enough for some of them smile.png


While I personally do not think it was worth the downvote, std::string does in fact have length as an alternative to size.
That said, I also agree with what Trienco said. It's perfectly alright to learn C but a lot of people do it for the completely wrong reason and they cause themselves or innocent bystanders problems with that.

This topic is closed to new replies.

Advertisement