There is also a C/C++ utility function that you could have used: std::isprint.
If you want to read about it: std::isprint
Search found 4373 matches
- January 4th, 2022, 10:40 pm
- Forum: Everything
- Topic: Trouble reading bitmap files 2
- Replies: 10
- Views: 5525
- January 4th, 2022, 10:37 pm
- Forum: Everything
- Topic: Common issues
- Replies: 11
- Views: 36138
Re: Common issues
Maybe. You could also try uninstalling, then reinstalling. I know the videos start with VS2015, but later move to VS 2017 and I can't remember if the tutorials use any features that aren't available in VS2015. I know if you follow the "STD Gems" videos you'll need at least VS2017, so maybe at least ...
- January 4th, 2022, 9:02 am
- Forum: Everything
- Topic: Trouble reading bitmap files 2
- Replies: 10
- Views: 5525
Re: Trouble reading bitmap files 2
Looks like you fixed most of the things I had posted about previously. The only thing I still see is: if (count < numplayers) Game(*wind); The compiler will probably skip over this because you aren't assigning Game to anything. Right now, the only other advice I might have is not using new/delete, b...
- January 4th, 2022, 8:45 am
- Forum: Everything
- Topic: Trouble reading bitmap files 2
- Replies: 10
- Views: 5525
Re: Trouble reading bitmap files 2
Look at this line in Font::drawText
You sure ch should be >= '~'?
Printable characters are between space ' ' and tilde '~' or 30 - 126 inclusive.
Code: Select all
if (ch >= '~')
Printable characters are between space ' ' and tilde '~' or 30 - 126 inclusive.
- January 4th, 2022, 6:01 am
- Forum: Everything
- Topic: C++ function declarations
- Replies: 1
- Views: 11187
C++ function declarations
template<rectangle RectType, math_vector VectorType, dimensions SizeType> [[nodiscard]] constexpr auto from_center( VectorType const& position, SizeType const& dimension )noexcept { using element_type = typename RectType::element_type; return from_center<RectType>( static_cast< element_type >( posi...
- January 4th, 2022, 5:36 am
- Forum: Everything
- Topic: Should I use VStudio 19 or VStudio 22?
- Replies: 5
- Views: 3008
Re: Should I use VStudio 19 or VStudio 22?
Glad to hear it. Good luck with the tutorials.
- January 3rd, 2022, 11:35 pm
- Forum: Everything
- Topic: Trouble reading bitmap files 2
- Replies: 10
- Views: 5525
- January 3rd, 2022, 9:50 pm
- Forum: Everything
- Topic: Trouble reading bitmap files 2
- Replies: 10
- Views: 5525
Re: Trouble reading bitmap files 2
The other thing I would do is initialize your bitmap header and bitmap info header using = {}; This sets all members to 0. Without initializing to 0, you get random numbers like the 52428 number for instance. This would be another indicator that something didn't load. This also makes it way simpler ...
- January 3rd, 2022, 9:47 pm
- Forum: Everything
- Topic: Trouble reading bitmap files 2
- Replies: 10
- Views: 5525
Re: Trouble reading bitmap files 2
There are several things to address here, but I'll address the bitmap info thing first. Something to add to the loading of the file in Surface that might shed some light on the subject. std::ifstream file( filename, std::ios::binary ); if( !file.is_open() ) throw std::runtime_error( "File not in cur...
- January 3rd, 2022, 7:14 pm
- Forum: Everything
- Topic: Common issues
- Replies: 11
- Views: 36138
Re: Common issues
Good deal, glad it worked out.