|
|
back to boardCompilation error #include "stdafx.h" #include <iostream> #include <conio.h> using namespace std; void bubbleSort(int array[], int col){ int temp=0; for (int i=1; i<col ; i++){ for (int j=0; j<col-i; j++){ if (array [j]>array [j+1]){ temp=array[j]; array [j]=array [j+1]; array [j+1]=temp; } } } } int _tmain(int argc, _TCHAR* argv[]) { int k; int max; int sum; sum = 0; max = 0; cin >> k; int *p = new int[k-1]; int i; for (i = 0; i < k; i++) { cin >> p[i]; }
bubbleSort(p, k-1); k=k/2+1; for (i=0; i<k; i++) { sum = sum + p[i]/2+1; } cout << sum; _getch(); return 0; } kgxvh8-ov2fjo kgxvh8-ov2fjo(1) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory What's wrong? There is no problem in Visual Studio 12 :( |
|
|