professor
it works , but windows_x64_message_box.obj:windows_x64_messag:(.text+0x1d): undefined reference to `VirtualAlloc'
professor
kernel32 problems
数学の恋人
Hey
Anonymous
#ot, honey
Anonymous
Nohello.com Dontasktoask.com
Anonymous
Are you stupid or what?
Anonymous
Sorry
professor
does anyone have a clean windows 10 without windbg?
Pete
Is it possible to get user input and use it as a global variable?
Anonymous
Yes
Anonymous
Use pointers of u can't make it without it
Invincible
I just asked questions and they said 'LOL'. This is not rude behaviour "Rose"
Pete
Get the input, have a pointer point to the variable value, have global variable = pointer?
Pete
In the case I mentioned the global var would have to be a * as well
Anonymous
It's like readable SFINAE😂
So how is it done? Long time 😐 I don't want my member function to do multiple things for multiple t-parameters, just want to enable/disable it
Burhan
Can you help me in this Enter 5 Number: From that 5 number print largest number And get the sum total of that 5 number C program
Burhan
?
Burhan
Surge.rs
That doesnt follow steps above but ok
Pavel
That doesnt follow steps above but ok
Not OK. How someone can help you if you don't specify what is the problem? Does this code compile? If not with what error do you get? Does it work correctly? If not, what is the result? And what is expected result? If it does compile, and does work correctly, then what's the problem?
Pavel
Why someone who wants to help you should read your mind or guess what you need
Anonymous
So how is it done? Long time 😐 I don't want my member function to do multiple things for multiple t-parameters, just want to enable/disable it
If you want to separate logic for different type parameters, you need to overload or use SFINAE if you want sane function to set of types if constexpr allows you to make logic of templated function in one place without making several SFINAE overloads
Anonymous
Or you can separate logic to some "impl" template functions (without SFINAE logic) and select which function to call in main function with help of if constexpr
Anonymous
I hope it makes sense
Anonymous
the program doesnt print the total cost of a function https://pastebin.com/fpkic6gL
Anonymous
If you want to separate logic for different type parameters, you need to overload or use SFINAE if you want sane function to set of types if constexpr allows you to make logic of templated function in one place without making several SFINAE overloads
Like private: TheFunc(); public: void Func() { if constexpr (template_bool_param) TheFunc(); else :/ idk } Or based on this idea void Func() { static_assert(t_bool_param, "Func not defined" ); TheFunc(); }
Anonymous
Or even more const's 😬 constexpr void Func() { static_assert(t_bool_param, "Func not defined" ); TheFunc(); }
So I guess I'll implement a private function with a separate template parameter and use this, so that there is a block to write static_assert in it! Hope the compiler to be happy with this Thanks a lot! @unterumarmung
Reza
Hello guys
Anonymous
else is not obligatory, is it?
Else the function should warn user that it doesn't exist
Anonymous
Why isn't gnome-shell memory leak fixed yet 🤦🏻‍♀ I can't do anything because of that
Anonymous
If you need a compiler error when you instantiate the template with a wrong type then static_cast is a way to solve it
Anonymous
Why isn't gnome-shell memory leak fixed yet 🤦🏻‍♀ I can't do anything because of that
Can't try anything yet btw.. 🙄 It's been more than 2~3 months ._.
Anonymous
guys, is it okay here if I asked someone to do my friend's code we'll pay him.
I_Interface
/warn Read the rules: no screen photo.
数学の恋人
/warn Read the rules: no screen photo.
Hey I have a request (to all admins), I'd like to create a new C/C++ group, but mostly for Indians. Reasons: 1. Most Indians (who are learning at least) use Turbo C/C++ or Borland C 2. Because they use things as mentioned in 1. they send screen photo (not even screenshots) hence it makes whole group little deviated (to warns and bans) and also those people don't get help. They also don't speak good english (dunno why)
数学の恋人
I'm all fine if admins say no.
Dima
数学の恋人
they’ll come here anyways
yes, but you can send them to other group also
klimi
Sure, if he's the one who maintains it
klimi
He just creates and admins it
klimi
And we redirect all the Indians there
klimi
It's a win-win situation
SjD
C is still very much required,even in 2019
SjD
Because otherwise we would have to program with omputers
SjD
omputers
Mat
What is a omputer?
SjD
A computer,without C
Mat
C is still very much required,even in 2019
Not so much. It depends on what you need to do
Dima
lol some metaphorical non-sense
Mat
A computer,without C
OMG 😂😂😂😂😂
SjD
Get it?
Dima
this is retarded
SjD
😃😃😃
Dima
read the rules
klimi
whew
Z0OM
Hey
Z0OM
If i paas int pointer to a function
Z0OM
Pass*
Z0OM
What should be the function definition? like - void function(int *temp)?
Dima
Yea
Z0OM
I am calling it like - function(int *number)
Anonymous
Hi
Matic
Why does this code produce an error (in sensor read) when it recieves a serial input? Do I have to "clear" the outputs or something? https://pastebin.com/R2TJ2J0V
Anonymous
What is function
Anonymous
Hello
Z0OM
Asking me?
Z0OM
int main() { int n=10; *number=n; Function(*number); } And function definition- void Function(int *x) { *x=5; } will this code change value of n to 5?