Hope this helps newbies.
clrscr()
system("clear"); //Needs cstdlib headder file so do #include<cstdlib>
getch()
getchar(); // Needs stdio.h so do #include<stdio.h>
And yeah, always use using namespace std; after including headders. Need that because actual usage of cout...
I have to read a text file using ifstream. The file contents are
1
10
Insurgence
1998
7.1
0
I have written following two codes for reading the file
code 1
#include<iostream.h>
#include<fstream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
void main()
{...
I've made this Calculator which can only calculate for 2 inputs only. How should I write the program, so that, the user can give multiple inputs and the calculation is performed?
/*
Work of Ashrith Babu Rao, XII
Email: a5hr1th.mb@gmail.com
(c) 2008
*/
#include <iostream.h>...
I am creating a little movie rental program for a project. I am in Class 12.
The code is below:
#include<fstream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
class movie
{
int no;
char title[100];
int year;
float rating;
int rented...
#include <stdio.h>
#include <conio.h>
#include <alloc.h>
/* structure containing a data part and link part */
struct node
{
int data ;
struct node * link ;
} ;
/* This is The Part of Programm*/
The Problem is when i m running This Program (of Linked List) Runs Properly But...
I am trying to make a program which will accept the names and cordinates of the points to be plotted and then plot the points, its a graphics program in C language but sometimes the name given are not displayed properly (sometimes shows NULL or weird characters).
#include <stdio.h>
#include...
High School/Jr.High
10 PRINT "HELLO WORLD"
20 END
First year in College
program Hello(input, output)
begin
writeln('Hello World')
end.
Senior year in College
(defun hello
(print
(cons 'Hello (list 'World))))
New professional
#include <stdio.h>...
//dont run from the ide make a .exe file of the program by compiling it n then make n then run from the exe file
#include <stdlib.h>
#include <stdio.h>
#include<io.h>
int main(void)
{
printf("About to spawn command interpreter and run a DOS command\n");
//create a file named 1.txt...
Hello all,
My stdafx.h file contain:
#pragma once
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to...
Below the is the program code for DDA line drawing algorithm. It compiles with no error and runs fine on my college computers but at my home it gives "run time error" which is"BGI Error: Graphics not initialized(use 'initgraph')".:( Resolve it please.
#include<stdio.h>
#include<conio.h>...
I need C code to save the output of the following program into a jpg file(any picture file)?
i need to save the output of this program in to a picture file..i need to take printouts of those output..help me with the code that does the above thing...
i executed this program...
#include<conio.h>
#include<stdio.h>
struct name
{
char n[20];
};
function (int *n)
struct name *n
{
printf("%c",*n->n);
}
void main ()
{
struct name n
scanf("%c",&name.n);
function(&n);
}
this is a simple program in which i have to take user name then print it using pointer , function and...
see this code.........this works perfectly in turbo c, borland c 4.5 but gives a error in visual c++ 2008.
code:-
few more questions :-
what does "using namespace std;" means.................
this above code is out dated as per visual 2008 ..............so what is outdated in...
I made a C program for my college labs for counting the number of alphabets digits etc. in an entered string.But it is not working.It is not showing any error but is not giving correct results.Please debug it for me.I have to use call by reference so please dont change that...
I am trying to self learn c++ and the first program mentioned in my book is
#include <iostream>
using namespace std;
int main()
{
cout << "c++ is better than c.\n ";
return 0;
}
In which of the digit's cd/dvd, the program which can execute this code is given?
Here're two progs to transpose and mxn matrix and reverse the same.
//TO REVERSE A 3X4 MATRIX.//
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
clrscr();
int a[3][4];
for(char i=0;i<3;++i)
{
for(char j=0;j<4;++j)
cin>>a[i][j];
}
for(i=2;i>=0;--i)
{...
I have my Object Oriented Programming lab exam tomorrow. Hence I'm trying out some programs.
This program is to concatenate Strings using dynamic memory allocation.
I don't get a compiler error but when I run it it doesn't give output.
Please anyone find out the error & tell me asap before...
This code works fine on borlaand c++ 5.0 but it scans only first object in turbo c++ IDE
what is the problem with this..???
#include <stdio.h>
#include <conio.h>
struct student
{
char name[10];
int no;
float marks;
};
void main()
{
struct student s[5];
int i...
Hi Guest we just wanted to alert you to a major change in the forum. We will no longer be allowing the posting of outgoing links. Please use the attachment feature to attach media to your posts.