Skip to content

Perpetual Enigma

Notes from the Frontiers of Mathematics

  • Home
  • Archives
  • About

Tag: C

Reading JPEG Into A Byte Array

December 28, 2013December 29, 2013 ~ Prateek Joshi ~ Leave a comment

Let's say you are working with images for your project. A lot of times, when you have to work across multiple platforms, the encoding doesn't remain the same. In these scenarios, you cannot process images directly by treating them like 2D matrices. One of the most common image formats you will comes across is JPEG. … Continue reading Reading JPEG Into A Byte Array

C++ Vector Memory Release

October 20, 2013 ~ Prateek Joshi ~ 4 Comments

When you use C++ STL, it takes care of freeing up memory after a variable goes out of scope. But let's say you have some code that needs the memory to be freed up immediately. This can happen under many circumstances when you are working under constrained resources. One of the more popular STL containers … Continue reading C++ Vector Memory Release

Random Number Generators In Programming

August 10, 2013November 1, 2013 ~ Prateek Joshi ~ Leave a comment

If you have fiddled around enough with C/C++/Objective-C, you must have noticed that if you use rand() function on its own, it gives the exact same numbers every time. Now how is that possible? Isn't rand() function supposed to generated completely random numbers in a given range? The reason for this has something to do … Continue reading Random Number Generators In Programming

Expected Expression Error

August 10, 2013November 1, 2013 ~ Prateek Joshi ~ 1 Comment

You tried to declare a variable after a 'case' statement and it showed an error. If that's the reason you are here, then read on. This must actually be surprising to most people familiar with C++ programming because C++ allows us to declare variables almost anywhere in the program. In fact, declaring them close the … Continue reading Expected Expression Error

Posts navigation

Newer posts

Number of views

  • 2,724,511 views

Number of countries

210 countries

Enter your email address to follow this blog and receive notifications of new posts by email.

Blog at WordPress.com.
  • Subscribe Subscribed
    • Perpetual Enigma
    • Join 601 other subscribers
    • Already have a WordPress.com account? Log in now.
    • Perpetual Enigma
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
Loading Comments...