I'm trying to make a chess game for 2 on visual studio but I don't get why min isn't defined
any clues?
>>59133950
https://msdn.microsoft.com/en-us/library/system.math.min(v=vs.110).aspx
Is Math.min
>>59133950
change the variable
like int extramin = 0;
then set colum =extramin(dx,ox)+1;
>>59134025
why though
usually min() works
I still got the same error
wtf
>>59133950
If you're using C++...
Ensure you:
#include <algorithm>
And it's under the std namespace, so:
std::min(1, 2);
>>59134225
I did put using namespace std in the beginning
I know it's bad practice but i am relatively new
why include algorithm if I may ask
>>59134257
That's the header file where the function is declared.
And yes, using namespace std; is bad practice.
>>59134267
but why
like it's gonna be a pain to write std:: if I have let's say 10 cout etc...
>>59134267
isn't min in cmath like
>>59133998
said
use ctrl+k+d to tidy up your code you filthy asscrack
>>59134328
If you're going to be using a language like C++, you need to learn things up yourself.
>>59134346
There's no reason to use c libraries when writing modern C++. If you want to use C, use C.
>>59134401
Its ctrl+k , ctrl+d one after the other if you are finding this doesn't work.
>>59134466
we learned in college that cmath is c++
math.h is c
>>59134466
Imagine I wanted to use sqrt i'd need cmath you know
and C is shit imho or so I've read
c++ is better
>>59134596
Your college is shit.
cmath is how you include c's math library in C++.
>>59134684
so I do need it to include math functions in c++ that's my point
>>59134466
was wrong
>>59134707
no you stupid nigger, you #include <algorithm>
>>59134707
http://cpp.sh/6p76f
>>59134707
You're not fit to use C++. Pick a different language.
>>59134596
Windows Dev hate C, in Windows C is legacy.
Use GCC or Clang or make VM of Linux is way easy development.
How hard is it to just make the function yourself
min (a, b) {
return a > b ? a : b
}
>>59135131
>t. C-tard
>>59135019
can't I get better with time?
I'll try to be better i can do it