You are on page 1of 1

#include "stdafx.

h"
#include <iostream>
using namespace System;
using namespace std;
class mar{
public:
mar();
void ver();
void hor();
private:
int x,y;
};
mar::mar(){
x=y=0;
ver();
hor();
}
void mar::hor(){
Console::ForegroundColor=ConsoleColor::White;
while(x<=78){
Console::SetCursorPosition(x,0);
cout << char(178);
x++;
}
x--;
while(x>=0){
Console::SetCursorPosition(x,23);
cout << char(178);
x--;
}
}
void mar::ver(){
Console::ForegroundColor=ConsoleColor::White;
while(y<=23){
Console::SetCursorPosition(0,y);
cout << char(178);
y++;
}
y--;
while(y>=0){
Console::SetCursorPosition(0,y);
cout << char(178);
y--;
}
}
int main(){
mar m;
cout << endl;
system("pause");
return 0;
}

You might also like