|Can anyone elaborate? Is it possible to create a function to draw pixels on to the screen with pure c++|
Define "pure C++"
C++ is just a language, and strictly speaking you can't do anything with it without the use of libraries. Not even keyboard input/console output.
Everything is done with libraries. Unless you're interfacing with the video driver directly (not recommended... and I'm not even sure if it's possible for programs to do that on modern OS's... since that would be an EXTREMELY high system security/stability risk).
Libraries like SDL, SFML, Allegro, etc just use other libraries like DirectX, OpenGL, etc. DirectX, OpenGL etc provide a common API to interface with the actual hardware.
But it all goes through the OS, because the OS has to manage system resources.
Basically, the days of one-on-one communication with the hardware are gone. Unless you are writing device drivers, or boot systems, etc... you probably won't be doing actual hardware communication anymore.
So yeah... everything is done with libraries. So to answer your question... "no, you can't do that with pure C++. You need a library."
The question now is what kind of library do you want to use?
Higher level libraries like SFML, SDL, Allegro are easier to use and work across several platforms... but add an additional dependency to your program.
Lower level libraries like DirectX, OpenGL are generally more difficult to use but offer greater flexibility. Using these libs still require a dependency, but many people already have these libs installed on their system so it usually isn't an issue.
So the question you have to ask yourself is which library do you want to use? Low level or high level? Is there any benefit to gain from using a lower level lib? If your only concern is being able to plot individual pixels, I would stick with a higher level lib. No sense in making things needlessly more difficult for yourself.