User Profile
Collapse
-
-
but when i remove the include "stdafx.h" i get 23 errors!! -
stdafx.h
im writin a code for a linked list question..im getting the error " cant open include file : stdafx.h. no such file or directory"
what do i do??? -
linked list
ive having problems doing questions on pointers and linked list..pointers ive unserdtood the concept but i find linked list quite complex..do u know aby sites whr i can get examples of codes for linked list and pointers -
how to use visual C++
hi all..i hav just started using visual C++..earlier was using turbo C++ .. so wud like to know how to use visual c++, its main functions, how to write prgs, etc..i know its almost the same though..if u know any sites plz let me know thx -
power using recursion
the question is to calculate x^n(x power n) (whr n can be +ve or -ve) by using recursion. the algorithm is
x= 1, n=0
1/x^n, n<0
x*x^(n-1), n>0
ive written the program it runs but im not having the correct values..here is the code:
Code:#include<iostream.h> #include<conio.h> int power(int n); int x,n;
-
classes
Hi...ive having some prob dealing wiv classes question though ive understood the concept.. if u cud help me wiv the following question:
The class Date has the following data members:
Month
Day
Year
and member functions:
A default constructor that initialises all data members to zero.
A constructor to create and initialise a Date object with the... -
int main and void main
Hi all..i wud b grateful if u cud explain to me when to use int main and void main, wat is the difference and when to use return 0 or 1 in c++..thx -
-
file seekg
Hi
I have to write a prg for the following question..
A file carsale_june.tx t stores the number of small and medium-sized of cars sold in the month of June by a car company. The first line of carsale_june.tx t is an integer that indicates the number of carsalemen working in the company. Each row afterwards consists of three data items, namely, the saleman employee id, followed by the number of small-sized and medium-sized cars... -
by using functions:
here is the statement
void max(int a,int b,int c,int d)
{max_val=a;
if (b>max_val)
max_val=b;
if (c>max_val)
max_val=c;
if (d>max_val)
max_val=d;
}Leave a comment:
-
Ok thx but now the problem is that when im cout the fibonacci(x)
i get only a list of zeros..the fibonacci series is not being generated
wat do i do?...Leave a comment:
-
U have to assign one of the variables to be the maximum then u compare it with the remaining 3 variablesLeave a comment:
-
fibonacci series using recursion.. error not an allowed type
Hi!
I hav to generate fibonaaci series using recursion:
0,1,1,2,3,5,8,1 8,21...
whr
fibonacci(0)=0
fibonacci(1)=1
fibonacci(n)=fi bonacci(n-1)+fibonacci(n-2)
ive witten the code but having 2 errors:
#include<iostre am.h>
#include<conio. h>
void fibonacci(int i);
int n,x,f;
void main()
{clrscr();
for(n=0;n<100;n ++)
fibonacci(x);... -
SORRY 4got to give my code
here it is:
#include<iostre am.h>
#include<conio. h>
#include<fstrea m.h>
void main()
{clrscr();
float x,y;
ifstream fin;
fin.open("temp. txt");
ofstream fout;
fout.open("celc ius.txt");
while(!fin.eof( ))
{fin>>x;
cout<<x<<" ";...Leave a comment:
-
files problem
Hello
Ive written a prg 4 the following question:
Develop a piece of C++ code which opens a file called temp.txt, containing a list of
integer values representing temperatures in the Fahrenheit scale. Your code should
convert each temperature to its Celsius equivalent and write it to a file called celsius.txt
containing the converted temperatures. You should give declarations for any variables
you... -
error: call of a non function
Hi!
I'm suppode to write a prg to calculate maximum and minimum of 4 intergers by using functions
i've writen the code but getting the error: call of a non function..cant see my error help me..here is my code
#include<iostre am.h>
#include<conio. h>
void max(int a,int b,int c,int d);
void min(int a,int b,int c,int d);
int num1,num2,num3, num4,max_val,mi n_val;
void main()...
No activity results to display
Show More
Leave a comment: