MkIII_Supra
10-31-2001, 01:22 AM
I am using KDevelop to build this simple program for my software testing class. But the make option or build options are not active. I tried to go my command line and use g++ but I got the following error:
MkIII Supra: g++ exer3.cpp
exer3.cpp:9:19: conio.h: No such file or directory
exer3.cpp:40:1: warning: no newline at end of file
So any suggestions from the KDevelop gurus? I haven't really had much time to play with it yet so my C/C++ is rusty and trying to learn a new IDE on top of refreshing my C/C++ skills... anyhow thanks in advance!
/************************************************** **************
Author Name: Mac McDonald
Program Name: exer3.cpp
Statement of purpose: Request three numbers, read them in
Display the numbers, the total and average
************************************************** ***************/
/* Header file(s)) for this program */
#include <stdio.h>
#include <conio.h>
/* Start main function */
main(){
int nbr1, nbr2, nbr3, total, average;
/* initialize total to zero */
total = 0;
/* Get each number from the user and add it to the running total */
printf("\nEnter the first number followed by the enter key : ");
scanf("%d", &nbr1);
total = total + nbr1;
printf("\nEnter the second number followed by the enter key : ");
scanf("%d", &nbr2);
total = total + nbr2;
printf("\nEnter the third number followed by the enter key : ");
scanf("%d", &nbr3);
total = total + nbr3;
/* Compute the average */
average = total / 3;
/* Print the numbers */
printf("\n\nThe numbers you entered, total and average are: ");
printf("\n\nnbr1 is %d, nbr2 is %d, nbr3 is %d" , nbr1, nbr2, nbr3);
printf("\nThe total is %d\nThe average is %d" , total, average);
getch();
return 0;
}
[ 31 October 2001: Message edited by: MkIII_Supra ]
[ 31 October 2001: Message edited by: MkIII_Supra ]
MkIII Supra: g++ exer3.cpp
exer3.cpp:9:19: conio.h: No such file or directory
exer3.cpp:40:1: warning: no newline at end of file
So any suggestions from the KDevelop gurus? I haven't really had much time to play with it yet so my C/C++ is rusty and trying to learn a new IDE on top of refreshing my C/C++ skills... anyhow thanks in advance!
/************************************************** **************
Author Name: Mac McDonald
Program Name: exer3.cpp
Statement of purpose: Request three numbers, read them in
Display the numbers, the total and average
************************************************** ***************/
/* Header file(s)) for this program */
#include <stdio.h>
#include <conio.h>
/* Start main function */
main(){
int nbr1, nbr2, nbr3, total, average;
/* initialize total to zero */
total = 0;
/* Get each number from the user and add it to the running total */
printf("\nEnter the first number followed by the enter key : ");
scanf("%d", &nbr1);
total = total + nbr1;
printf("\nEnter the second number followed by the enter key : ");
scanf("%d", &nbr2);
total = total + nbr2;
printf("\nEnter the third number followed by the enter key : ");
scanf("%d", &nbr3);
total = total + nbr3;
/* Compute the average */
average = total / 3;
/* Print the numbers */
printf("\n\nThe numbers you entered, total and average are: ");
printf("\n\nnbr1 is %d, nbr2 is %d, nbr3 is %d" , nbr1, nbr2, nbr3);
printf("\nThe total is %d\nThe average is %d" , total, average);
getch();
return 0;
}
[ 31 October 2001: Message edited by: MkIII_Supra ]
[ 31 October 2001: Message edited by: MkIII_Supra ]