give your code a test in turbo2.0, but no error.
maybe you should have a setting in Options: directories, then save options.
User Profile
Collapse
-
-
-
i think it should be:
char item[3];
cout<<"enter any no. of items ";
for(int i=0;i<3;i++)
{
cin>>item[i];
}
fstream file;
file.open("stor e.dat",ios::app |ios::out);
file.write(item ,sizeof(item));
file.read(item, sizeof(item));
file.close();Leave a comment:
-
...Code:#include <stdio.h> #define N 20 int C[N]; int addarrays (int add1, int add2, int counter); // declare function int main() { int A[N], B[N]; // A[], B[] should be initialed before used. int i; for(i=0; i<n; i++) { printf("%d\t", addarrays(A[i], B[i], i)); printf("\n"); } } intLeave a comment:
-
-
because the formal parameter when functions are called is just a copy of actual parameter, so sizof() is just a size of a pointer.
if the name of an array is operand of sizeof, then it returns the size of total array. so, it has some different.Leave a comment:
-
Code:char swap = '\0'; for (i = 0; (i < 8, j = 7 - i) && (i <= j); i++) { swap = char_buff[i]; char_buff[i] = char_buff[j]; char_buff[j] = swap; }Leave a comment:
-
you could get the subject of the function "contour" in matlab.
then, modify it.Leave a comment:
-
Code:#include <iostream> using namespace std; void Add( int add1, int add2); void Sub( int sub1, int sub2); void Mlt( int mlt1, int mlt2); void Div( int div1, int div2);
Leave a comment:
-
it should be
...Code:#include <iostream> using namespace std; void main() { int x; cout<<"Masukkan umur Anda: "; cin>>x; if (x < 5) cout << "Wah, masih balita nih ^_^" << endl; else if (x < 12) cout << "Masih anak-anak ya?" << endl; else if (x < 17) coutLeave a comment:
-
No activity results to display
Show More
Leave a comment: