Simple C++

#include‬<stdio.h> #include<conio.h> void main() { printf("My love story :P"); if(love==True) { prinf("i luv u 2 much"); } else { printf("still searching"); } getch(); }

1 Response

class CRectangle {
int x, y;
public:
void set_values (int,int);
int area (void) {return (x*y);}
};
void CRectangle::set_values (int a, int b) {
x = a; ??
y = b;
}
int main () {
CRectangle rect;
rect.set_values (3,4);
cout << "area: " << rect.area();
}

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.