Oleg
it gives `multiple definition of f123`
Oleg
I know if I move defenition in cpp file it will work, but why it doesn't work if it is in h-file
Oleg
it's why #ifndef is made for...
Dima
You have to make it inline or define the function in a separate cxx file
Pavel
Pavel
if you mean "source file" - yes, but it also should work in h-file
Not exactly.
I go with big simplification, because compilers nowadays doing some smarter things but the idea is the same.
Imagine your program as a group of cpp files where everything that is #included is actually included in them.
Some headers can be included twice but then include guards will disable duplicated code.
Each that thing is a translation unit.
You have several translation units that are compiled each in an object file (if I correct with naming).
Then you have linker that will link code that calls with code that define what is called. And there you have a problem when you have definitions in header files, because you have many definitions of one thing.
Pavel
And in reality these definitions can be different so it's not safe to take just random one
Priori
Can anyone here teach me C program and c++
Priori
?
BinaryByter
#personal_trainer
Dima
BinaryByter
fuck rose is broken
Dima
Oleg
Ainu_r
Do i request pdf for educational purpose
Ainu_r
BinaryByter
/ban
Damien
Hey, need to create wsdl file for the soap web service but I dunno how and what to use for that. I need something like wsdl editor with design mode and etc. but I didn't find any open source apps. Thanks in advance.
Anonymous
I don't understand why this happens
Anonymous
Hai im system information student, nice to meet you all
german oak
hola
Anonymous
.
Anonymous
Joe
Who’s good in sorting arrays?
Wim
*starts headbanging*
Anonymous
Joe
Francisco
Good then not you
I've coded more sorting algorithms than you can think, don't judge so quickly
Dima
Dima
Anonymous
Please tell me about friend function in C++
klimi
It takes 2 uid as parameters and outputs social.life.relationships.status
Dima
It allows you to instantiate classless function/operator which can be applied to these two classes/structs
Wim
Dima
I think he meant an operator
Wim
So if you have the relationshipstatus, would that trigger a divorce when both are married or won't the compiler figure out they're cheating?
Wim
Can they have kids?
Anonymous
Hi
Anonymous
I have a question, how does windows c++ implement process hiding and port hiding?
Anonymous
I found out that Google searched a lot of information, and did not find any related functions/APIs that could implement Windows process hiding, port hiding, or port multiplexing communication.
Anonymous
I hope that friends who know this technology can help me to provide some information for me to study.
Dima
I like your profile pic
Anonymous
If I can provide some relevant information, I will not be grateful. I searched for related technical cases on github and did not find it. If you can tell me the research direction in related fields, I will go deeper and understand.
Anonymous
professor
I am trying to generate a key from a given functions made by me, but I want to add randomize algorim without repetition similar as I do in python using secrets , but how can I do it in c++? my variable seq which store one , two , three, four , but once I want to concatenate my functions to generate my key if I change to std::vector<std::string my t it return an error of std::basic
t = string.ascii_lowercase + string.ascii_uppercase + string.digits + string.punctuation
key = ''.join([secrets.choice(t) for _ in range(20)])
int main(){
std::vector<std::string> seq{ "One", "Two", "Three", "Four" };
std::string t = reverse.ascii_lowercase() + reverse.ascii_uppercase() + reverse.digits() + reverse.punctuation();
std::cout << reverse.join(seq, "--") << std::endl;
std::cin.get();
}
Anonymous
Who knows the technical details?
Joe
Ask Nobody help here anw 😂
BinaryByter
alternatively, quit the internet
BinaryByter
will reduce the amount of headbanging
BinaryByter
(please give me your postal adress first tho 😂)
BinaryByter
🐰🐾 سمیه
/* conddetab.c : Extend entab and detab to accept the shorthand entab -m +n to mean tab stops every n columns;
starting at column m. choose a convenient (for the user) default behaviour */
🐰🐾 سمیه
what does this part mean: tab stops ... it means tab is allowed, or removed ?
Anonymous
Can you guys suggest some good websites for coding competitions 😁
Niko
Ainu_r
Have 4G internet access for super sim pls anwer me
Anonymous
Anonymous
/warns
Shubh
Has anyone worked with AVR or ARM ?
professor
did you get myRand?
Pavel
Which one do you prefer:
typedef some_long_declaration alias;
Or
using alias = some_long_declaration;
?
Anmol
Does Anyone know qt c++?
professor
still the same problem I cannot use it like this std::cout << reverse.join(randomString(15, t), "--") << std::endl;
professor
I cannot send it as std string because join function it will break. how can I send it to randomstring into one?
professor
using my login
professor
what does join do is to join 2 strings of the iterable
professor
I got the same ` std::cout << reverse.join(randomString(20, std::accumulate(std::begin(t), std::end(t), std::string())), "--") << std::endl;
` error std:string to const vector
professor