BinaryByter
nobody can understand python
D
it throws you at pointers as soon as you hit scanf
Pointers are the easy way out !!! Strings actually suck in C!!!
Anonymous
if you don't care about this things just use python
BinaryByter
BinaryByter
it's just an array wiht a 0-termination
BinaryByter
please don't spam ! and ? 😅
BinaryByter
it irritates me lol
D
there is no such thing as a string in C
String ops in C are a pain in the ass.
BinaryByter
Zeus
start coding the right way...
I really need to level up my logic skills😔
Alignant
it's just an array wiht a 0-termination
Which helps you learn how it really works. Because string in almost any language is a bunch of chars with a null at the end.
Alignant
Anyway, if you're doing C++ you definitely have to know what a C-string is
BinaryByter
Does it matter??😅😅 I mean in the long run of course... But who cares for the minor projects😂
you should learn well from ground on. there is a huge environmental impact on using good software practices
BinaryByter
a beginner can be fine with a std::string
BinaryByter
infact, any string literal is a std::string
BinaryByter
Try php with their === shit conditions
google "php a fractal"
Anonymous
Hello
BinaryByter
Yes I do
then, don't use an IDE
Kelvin
Qtcreator
Kelvin
Kdevelop
BinaryByter
then, don't use an IDE
use a text editor and the compiler
BinaryByter
Yes. What makes pointers hard?
they are VERY hard to grasp for a beginner
Zeus
then, don't use an IDE
I know I don't need it but one click compile privilege has already made me lazy😂
Anonymous
use a text editor and the compiler
or you can make your own IDE
Zeus
or you can make your own IDE
Legendary thinking mate..
Alignant
they are VERY hard to grasp for a beginner
Not really. It was harder for me to grasp recursion
BinaryByter
I know I don't need it but one click compile privilege has already made me lazy😂
vs code has a key combination for executing command line stuff
Zeus
vs code has a key combination for executing command line stuff
U don't need to declare specific header files for that?
Anonymous
infact, any string literal is a std::string
Language: cpp_gcc Source: #include <typeinfo> #include <iostream> int main () { std::cout << typeid("string literal").name() << '\n'; std::cout << typeid(std::string("string")).name() << '\n'; return 0; } Result: A15_c NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
D
they are VERY hard to grasp for a beginner
Normal usage is easy. Passign it to a function was an isue and double triple ... ppointers.
Alignant
I don't believe you
You don't believe that I didn't have much problems with pointers, or that I struggled much more with recursion? :D
BinaryByter
xD
Anonymous
@QNeko EXPLAIN
nothing to explain even if you consider multiple overloads of a function which takes a single argument one with const char* and the other with std::string if the function is called with argument "blablabla" it will consider the const char* overload
BinaryByter
@QNeko EXPLAIN
according to the internet "string" are chars[]
D
the C++ is easier
Maybe .. Do really like STL in C++. I just use C++ for vectors/list/other implementations
BinaryByter
and I just believed him
Zeus
no
Like if I need to use a cls operator which u can't just normally do in c++.. I'll have to declare an alternative to windows.h for Linux.. to use system(clear);
klimi
+-
BinaryByter
install visual studio code and you'll see what I mean
Alignant
no, you don't use system(dosmthing) in order to compile
Have you ever done anything with a gui from a just a text editor?
Anonymous
Language: cpp_gcc Source: #include <iostream> void overloaded_function(const char*) { std::cout << "const char* overloaded function\n"; } void overloaded_function(std::string) { std::cout << "std::string overloaded function\n"; } int main() { overloaded_function("kiao"); Errors: source_file.cpp: In function ‘int main()’: source_file.cpp:12:30: error: expected ‘}’ at end of input overloaded_function("kiao"); ^
BinaryByter
indeeed
BinaryByter
GG
klimi
oh
Alignant
no
This is hard, lol. A good reason to use QtCreator
Dima
Who wouldn’t like Steve Wozniak as the friend o.O
Dima
The real one tho
Alignant
Dima
Yah yah yah
D
Talking about Woznaik, not Woziak !!! Chinese ripoff :P :P :D :D
Anonymous
the LEGENDARY IF ( obfuscated if ) if(((((((((((((dbg*cn1())/cn1())*cn2())/cn2())*cn3())/cn3())-cn4())+cn4())+cn5())-cn5())*cn6())/cn6())>0) { MessageBox(0,_TEXT("dbg > 0",L"Title",0); }
Anonymous
D
What????????????????????????/
D
sure but a ripoff
Anonymous
Anyway it is good for a beginner to learn about pointers
D
Like what ??/
D
Dont tell me taht Xerox story