Problems Faced By Begineers In C/C++

This article is written mainly for the student of 1st years who enter in the college and are new to computers.

Generally they learn how to program in c, how to compile a source code or like this only. If there is any small problem they can’t sort it out and change their pc by saying that this tc is not working.

Tech Guru would like to bring the attention of these students to some points which will help their working in c better.

1. Many times you must have faced problem like "Unable to open include file 'IOSTREAM.H' or like that,

This may be the error even if your file is present in the correct directory and if the path is set wrong. If such kind of errors are faced by the user then he/she should go to OPTIONS>DIRECTORIES and in this he/she should give the correct and full path name of header (.h) files. Usually they are located in the folder named INCLUDE in the TC folder.

2. Some of the readers might have tried to use graphics in c, and many out of them may have faced the error

"Graphics error: Device driver file not found (EGAVGA.BGI) Press any key to halt". This problem has two solutions

First user can set the path of EGAVGA.BGI file in initgraph section, usually this BGI file is located under the TC\BGI directory.

after setting the path it should look to user as


Note the double ‘\’ in the path, gdriver is the driver we are using and gmode is the mode in which we are working. In our case we have TC on F:\ so we set that path as “F:\\TC\\BGI”. Second way to solve this problem works only for the current session but is quick and easy to follow. If your initialize graphics (initgraphics) function looks like


Then just go to FILE>CHANGE DIRECTORY and change the directory to your BGI directory and graphics shall work fine for current session.

3.For the users who have used graphics in C/C++ must be knowing that we can only use 640*480 resolution or can work only in VGA mode by default, but there is also a way we can use better resolution. Even we can use 1024 *768 resolution in Turbo C!!!

For that you have to download a file (SVGA256.BGI) which is device driver file (can be found easily on the web) and then u have to install the display driver while running the program, That can be done easily by

Writing a function (keep it outside the main function)

int huge mode{return(4);}


and rest all will be same means initgraph and all that.

4. You must have used functions in programming and surely have passed parameters in that, ever thought of passing arguments to main()!! . Yes we can pass parameters to main also

For that our main will look like

void main(int argc, char *argv[])

it is so simple, argc is a integer which will count the number of arguments in your program and argv is array of pointer to strings. It will store the different arguments in it. Of course the first argument i.e. argv[0] will be file name only, we pass arguments by command line means after compiling file exe is generated and then suppose our executable name is prog01.exe .While working in dos or command line we will give the following command.

C:\>prog01.exe arguments to main

In this total arguments to program are 4 in number that will be stored in argc

And argv will be stored






variable name should be any, Means we can change it from argc and argv to anything we want but we should keep the data type same.

5. Ever thought something interesting by C , can u shutdown your pc by program or ever thought of deleting temporary files by your program. Hope till now it is clear that what we want to do now, we want to access dos commands from C program. To use it a function named as system() defined in STDLIB.H ,through which you can use your dos commands, Now to shutdown your pc assuming windows xp command is

“shutdown.exe –s –t xx” ,where –s stands for shut down, -t stands for time before shutting down. In windows 98 you can used “rundll.exe user.exe,exitwindows” to shut down your pc, learn more about this interesting command by the help of tc and you will also find the condition necessary for running this command successfully.

We here finish off with this article but still there are more and more and more things in C, The more you know it the more you will love C.

Get Tech Updates via eMail :


  1. Thanks to you! i was able to fix the "Unable to open include file 'IOSTREAM.H error!

  2. Thanks to you! i was able to fix the "Unable to open include file 'IOSTREAM.H error!

  3. Thanks Shubham :)
    Please Share Example Using SVGA.BGI File :)

  4. Thank Bro For Solving My Problem.



About Tech Guru

TechGuru is a leading technology site, dedicated to software, gadgets, tech news and reviews. The site offers articles, tutorials and how-to guides on all things related to personal technology, desktop applications, productive online tools, social networking sites, windows, office etc.

Founded in 2007, TechGuru features audience who have the passion for Software and Technology and seeks to promote awareness about the internet and computing.

Get News on the Go

Mobile TechQuarkTech Guru is a mobile-friendly website. Simply bookmark in your mobile browser for free access anytime, anywhere.

Contact Us / Send a Tip

Use Contact Form, if you have Comments, Problems, Suggestions, Praise, Complains about the site. Your suggestions and articles are valuable to us.

Copyright © 2007- Tech Guru - All rights reserved. No part of this blog be republished or written without prior permission of the author

Privacy Policy | Disclaimer | Contact | Advertise With Us

Designed and Maintained by Shubham Gupta