Discussion of chess software programming and technical issues.
Moderators: bob, hgm, Harvey Williamson
Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
-
chrisw
- Posts: 2206
- Joined: Tue Apr 03, 2012 2:28 pm
Post
by chrisw » Sat Nov 10, 2018 6:13 pm
Dann Corbit wrote: ↑Fri Nov 09, 2018 8:19 pm
mar wrote: ↑Fri Nov 09, 2018 12:33 pm
{snip}
You should learn a bit about C++ before trying to understand C++ code.
Don't those two things go hand in hand?
But it probably would be a good idea to read Bjarne Stroustrup's books.
Yes, I was going to say that too (the hand in hand).
I find, since I restarted doing code recently, that there is so much of everything and everything moves so fast, that it’s best to work with a subset of the thing you are working in, you can always look stuff up anyway and, reversing a habit of a lifetime, it’s a good idea to go in at the highest level you can. I tended to just naturally code in C++, but now I discovered Python.
-
syzygy
- Posts: 4458
- Joined: Tue Feb 28, 2012 10:56 pm
Post
by syzygy » Mon Nov 12, 2018 9:24 pm
Uri Blass wrote: ↑Thu Nov 08, 2018 5:25 am
I take the following line in stockfish's code that is the first line in main.cpp line 37
Code: Select all
std::cout << engine_info() << std::endl;
Do you want to find where the implementation of "engine_info()" can be found, or do you want to figure out what std::cout is doing?
For std::cout, just look here:
https://en.cppreference.com/w/
The search function brings you to here:
https://en.cppreference.com/w/cpp/io/cout
std::cout and the << operator are just unnecessarily "cute" ways to print stuff.