1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| cos() sin() tan() log() pow(x,y) abs() fabs() hypot() sqrt()
sort(numbers.begin(),numbers.end(),cmp); sort(numbers.begin(),numbers.end());
auto it =find(numbers.begin(),numbers.end(),value);
copy(numbers.begin(),source.end(),destination);
bool result =equal(v1.begin(),v1.end(),v2.begin()); bool result =equal(v1.begin(),v1.end(),v2.begin(),cmp);
std::cout << (result ? "Vectors are equal." : "Vectors are not equal.") << std::endl; FILE *f=fopen("example","w"); fclose(f);
fscanf(f, "%d %f", &number, &pi); fprintf(f,"xxx"); fprintf(f, "%d %fn", 42, 3.14159);
char a[100]; sprintf(a,"Value: %d", value); sscanf(a, "Value: %d", &readValue);
char c = getc(f); putc('A', f);
fgets(a,100,f); fputs("Hello, World!\n", f);
char a[100]; while (fgets(a, 100, f) != NULL){}
int main() { FILE *file = fopen("example.txt", "w"); if (file == NULL) { perror("Error opening file"); return 1; } fclose(file); return 0; }
|