[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

I'm trying to make a chess game for 2 on visual studio but

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 24
Thread images: 1

File: untitled.png (23KB, 951x534px) Image search: [Google]
untitled.png
23KB, 951x534px
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
Thread posts: 24
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.