Im Dumb!!!!!
Im Dumb!!!!!
Last edited by bar5037; 10-01-2007 at 12:49 PM.
Homework Policy.
Seriously... nobody here cares if you fail this assignment.
Sent from my iPadŽ
ill try this again when i actually have a specific problem
Last edited by bar5037; 10-01-2007 at 12:50 PM.
We could, but it appears that you have not even attempted it yourself.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Im Dumb Still
Last edited by bar5037; 10-01-2007 at 12:49 PM.
Of course if you'd shown up a week ago (or whenever you got the assignment) then we could have helped you.
But showing up in a panic with a few hours to go with the "hail mary" pass into the end zone hoping to get lucky is just that, a hope.
How about starting at the beginning, can you write the code just to input your polygon data. In other words, what's the first step which is causing you problems, so we know at about what level to pitch the answers at.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
salem your a good man... ok so heres what i have
#include <iostream>
#include <fstream>
using namespace std;
int main();
{
ifstream infile;
//open a file
infile.open("polytest.txt")
while (infile.eof());
cout << "enter number of vertices" <<endl;
cin >> Pvert;
now i wanted to see if that part was working, however when i tried to output the values a fatal error occured at the open brace.
1>c:\homeworkfiles.cpp\polygon\polygon\polygoncode .cpp(16) : fatal error C1075: end of file found before the left brace '{' at 'c:\homeworkfiles.cpp\polygon\polygon\polygoncode. cpp(6)' was matched
this is the specific error that came up. like i siad im new to this and im not an IST major.... i really apprecaite the help though.
Try to use [CODE][/CODE] tags when you post code. There are a few mistakes in what you posted... aside from the obvious fact that you never finish main, your while loop will never complete with that semicolon at the end of it and really you shouldn't be controlling a loop with the eof() method. However, maybe I misread your original assignment before you removed it, but I do believe it was significantly more advanced than what you just attempted.
Code:while(true); // That semicolon represents the end of the looping body, which means if the body // (which in this and your case is non-existant) never makes the condition false, // then the loop is infinite. /* A loop should properly be like this while(::condition::) { ::body of loop:: // Something here should affect the condition assuming it doesn't affect itself }; */
Last edited by SlyMaelstrom; 10-01-2007 at 01:19 PM.
Sent from my iPadŽ
> int main();
No ; here.
You seem to be missing a closing brace as well.
Also, please use the [code][/code] tags around the code when you post it.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.