Hi i'm new here and tommorrow i'll be doing some project in computer science so i need a template/outline of a triangle.h file, thanks in advance ; )

Recommended Answers

All 5 Replies

/* triangle.h */
#ifndef TRIANGLE_H
#define TRIANGLE_H

struct triangle
{
   double base, height;
};

#endif

you forgot the wait(1000000000); instruction ;)

Hi i'm new here and tommorrow i'll be doing some project in computer science so i need a template/outline of a triangle.h file, thanks in advance ; )

And you expect anyone to have a clue what you're talking about? triangle.h isn't a standard header, therefore it could be anything. What do you think we are? Mind readers?

And you expect anyone to have a clue what you're talking about? triangle.h isn't a standard header, therefore it could be anything. What do you think we are? Mind readers?

i can't really think of any other way to put it, "triangle.h " is all i could think of, if you want more specifics i meant i needed a : filled, basic triangle, this is a triangle that i will use preset coordinates for and i will use it in a program that makes shapes appear by clicking in different coordinates of the screen (circle in upper left part, rectangle in upper right part, square in lower left part, and finally, the one i need , a triangle in the lower right part), that's about all i can think of, i'm no expert on this stuff so i hope one of you knows how to make this triangle ; )

Oh and thanks to dave Sinkula for that code he posted, if you have the rest of the code i would appreciate it : )

a basic filled triangle

What GFX lib for a start? BTW a triangle is a LONG header if you're making your own without and GFX lib help, and you WONT get it done in a day, trust me, ive made many :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.