Lalit
Ookk thankyou
Anonymous
hola
Anonymous
Anonymous
Hi
cout << "zup?";
Anonymous
cout << "zup?";
cin>>openGL;
Anonymous
Anonymous
any discussion rn?
Anonymous
Start one?
Ибраги́м
cout << "zup?";
fmt::print("hi");
klimi
fmt::print("hi");
std::cout << "hello there!\n";
Anonymous
Yea
Kirat
fmt::print("hi");
System.out.print("hi there!);
Ибраги́м
System.out.print("hi there!);
Who's this HERETIC?!
Anonymous
System.out.print("hi there!);
system.out.println("hi there")
Ariana
echo hithere
Anonymous
guys, external variable is the same thing than global variable?
Igor🇺🇦
guys, external variable is the same thing than global variable?
Do you mean "extern var" ? It's a declaration of global variable that is defined somewhere.
_̸̡͝͝This
xD
_̸̡͝͝This
omg, I just came to this chat to ask about extern variables
_̸̡͝͝This
I've seen they are used to share gobal variables across files from a project, so, is that the only way to share a variable between files ?
Riccardo
I Need help
Riccardo
Recently i discovered that in .h files you have to put only the prototypes
Riccardo
But were do i have to implement the functions?
Igor🇺🇦
I've seen they are used to share gobal variables across files from a project, so, is that the only way to share a variable between files ?
You can use regular consts defined with include guards. Just be aware of static initializer fiasco
Igor🇺🇦
_̸̡͝͝This
You can use regular consts defined with include guards. Just be aware of static initializer fiasco
You've mentioned some concepts which I've never heard about, but I'll google them, thank you so much for taking your time to answer ! 😙
Igor🇺🇦
You've mentioned some concepts which I've never heard about, but I'll google them, thank you so much for taking your time to answer ! 😙
Are you talking about this concept ? https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use-members
_̸̡͝͝This
yes, also "guards"
Igor🇺🇦
yes, also "guards"
Guards is term that is used for #ifndef with #define
Riccardo
That's why you have cpp files
Ok but if i want to make a program using that library, do I have to include only the .h file or i have to include the .cpp too. Or do i have to Redefine all the functions again??
Anonymous
Ok but if i want to make a program using that library, do I have to include only the .h file or i have to include the .cpp too. Or do i have to Redefine all the functions again??
For c and Cpp programming, you will need to include the header files to compile. However, you will need the library to generate a executable
Riccardo
let me explain
Riccardo
I have a .h file and a .cpp file that implements the First file
Riccardo
How are those two files conected when i include the .h in One of my program
Riccardo
???
Igor🇺🇦
Igor🇺🇦
Just write your implementation in c/cpp files, declaration in header and include headers to cpp where you use those declared methods
Riccardo
Ok
Igor🇺🇦
You've certainly already did this when you use standard includes
Riccardo
So the compiler Will find the file that implements the functions automatically
Riccardo
Am i right?
Igor🇺🇦
If they are in correct paths compiler with create one binary that includes all the code
Riccardo
Ok
Anonymous
So the compiler Will find the file that implements the functions automatically
Then, there are two process. The first is the compilation. During this process, it will be necessary the functions prototype, including header files. This process generates a .o for each .cpp. the linker generates a executable using every .o and external libraries.
Jussi
std::cout << "hello there!\n";
Ah and with newline and no stream flushing
Anonymous
Thanks for the info
Anonymous
Okk
Anonymous
Do you mean "extern var" ? It's a declaration of global variable that is defined somewhere.
afaik, you can define your variables and functions and etc in header files too... another variations is define them in your .cpp files...
Igor🇺🇦
#pragma once
Include guards is name for #define / #ifndef, not pragmas.
Anonymous
Include guards is name for #define / #ifndef, not pragmas.
i mean, we can also prevent (guard) double header inclusion by #pragma once, too
Anonymous
Yes you can. But the question wasn't about that
sorry, looks like i quoting the wrong post
Anonymous
but
Anonymous
but
seems like there's someone asking: "do we just have to declare variables in header and define it in another file?" but i can't find that msg...
Anonymous
Hi , can I learn c in 2 months ..
Anonymous
Hi , can I learn c in 2 months ..
even faster, depends on your efforts too... http://www.cplusplus.com/doc/tutorial/
Anonymous
bill gates finished reading all the books in the school library in 2 weeks
Anonymous
afaik
Anonymous
btw, do you guys prefer if we create a discord server?
Anonymous
he asked for c and nit for c++
anyway,they both are similar. just without classes
Anonymous
btw, do you guys prefer if we create a discord server?
Telegram works better than discord for me
Anonymous
I'm more of an IRC fan but unfortunately people don't seem to use it much any more
Rijul
I'm more of an IRC fan but unfortunately people don't seem to use it much any more
Sorry. Off-topic but I am curious and have been meaning to ask to someone for a long time. How do you manage to hide your IP? Using TOR/Proxy? I tried IRC a few times, and I saw many users have a custom domain instead of IP. But when I tried, my real IP was being displayed. As much as I'd love to user IRC (I really liked it), I didn't follow it because of privacy concerns. (I'd want to hide my IP completely even if I am behind proxy/TOR). If not here, maybe you could PM me?
Anonymous
I run ZNC (an IRC bouncer) on my server which hosts my website so it's hardly private
Rijul
Alright. Thanks!
Igor🇺🇦
Didn't use it myself though
Rijul
This is used for bridging telegram group with IRC right?
Anonymous
There are a few bots which provide that functionality
Rijul
I don't want to bridge telegram with IRC and wasn't asking in that context. I was asking about IRC in general.
Anonymous
👍
Anonymous
how to change from decimal to degree, minute, second
Anonymous
could someone help me I got to do project for my study