User Profile
Collapse
-
Okay, thank you very much. This seems to make sense now.... -
I feel very silly( and slighlty confused) right now. This is my first time working with an applet. So if I understand, the only way to see what my applet looks like is to make an html file and than open it in a web browser. So what is the point of "Run Java Applet" if it does nothing?...Leave a comment:
-
Problem with Java Applets in Textpad
I've been trying to run a Java applet in TextPad. When I click on "Run Java Applet" it prompts me for my html file, but when I hit ok a window pops up and says "The system cannot find the file specified." Other times it dosen't even prompt me for my html file it simply tells me "The system cannot find the file specified." I figure it has nothing to due with my program because I get the same answer even when working with... -
Heres the code for filling the array.Code:int c; for(int index =0; index < numCoef ;index++) { cout<<"What coefficient do you want for x^"<<index<<": "; cin>>c; coef[index] = c; } cout<<endl;
*EDIT: I have a...Leave a comment:
-
dynamic array problems
I have a feeling I'm doing this whole dynamic array thing wrong, or Im misunderstandin g it.
Code:private: int degree; int numCoef; double *coef; Polynomial::Polynomial( int hdegree) { degree = hdegree; numCoef = degree + 1; coef = new double [numCoef]; FillCoef(); }
-
Thanks the (*head) one worked, I belive my star was in the wrong place. Thanks, I miss little things like that alot.Leave a comment:
-
Pointers and string trouble
My trouble causing lines are maked within the code.
Code:#include<iostream> #include<string> using namespace std; void main() { string* head; string* tail; head = new string; tail = new string; string reString; cout<<"Enter a some content you want reversed: "; getline(cin,reString);
-
Thanks for the help, it seems my problem was else where. When I went to post some more code here, I saw my problem clear as day. So thanks for the help, both of you.Leave a comment:
-
Problem with static variable
In my program I have a static variable that I declared, but when I debug my program is tells me that it hasn't been initialized.
Code:class HotDogStand { public: HotDogStand(int standID, int dogSold); void JustSold(); int ReturnJustSold(); static int TotalDogSold(int total); private: int _standID, _dogSold; static int _totalDogSold; }; int
-
-
Having difficulty with constructor
Okay I have to make this TicTacToe program. Everything works except my constructor(whi ch must initialize my empty board to all zeros) This is where I run into problems. For some reason my constructor won't do anything. Everything looks right, so I don't know what to do. Here's a snipit of my code.
Code:class TicTacToe { public: TicTacToe(); int checkWinner(); void printBoard(); void playGame();
-
-
Something about a new instance of visual studio or something. It keep popping up and doing a weird debugging thing. (Hope this makes sense.)Leave a comment:
-
When I tried string before this wierd screen popped up. Now it works though, so I presumed I typed something in wrong before.
Thank you so much, everything works now. I really appreciate your help....Leave a comment:
-
Should I be using string instead of char??? If so, then I must of done something wrong before.Leave a comment:
-
It would look something like this wouldnt it.
Code:vector<char> classList; for(int index = 0; index < numberClasses; index++) { cout<<"Enter name of class "; cin>>className; classList.push_back(className); }
Leave a comment:
-
I'd use a vector, but this is a class assignment(whic h I should have mentioned.)
The assignment stated that "classList – A dynamic array of strings used to store the names of the classes that the student is enrolled in"
Now I did change classList = new char[], to classList = new char[numberClasses]; but that didnt help.Leave a comment:
-
Dynamic Char array problem
Im having trouble with my classList variable. It's a dynamic array of strings used to store the names of the classes(my program ask for students name, number of classes, then a list of the classes).
Code:typedef char* CharPtr; class Student { public: Student& operator =(const Student& rightside); ~Student(); void input(); void output(); void setNumClasses(int);
-
Thanks, you hint sent me in the right direction. I think I figured it out....Leave a comment:
-
Dynamic array problems
It seems pointers and dynamic arrays are giving me a hard time.
Heres part of the assignment. We have to create a class named Student that has three member variables. One of the variables is called classList – "A dynamic array of strings used to store the names of the classes that the student is enrolled in"
My problem is when Im trying to send classList from my input function to my setClassList function. I keep...Last edited by AdrianH; Apr 27 '07, 08:35 PM. Reason: PLEASE use [code][/code] tags. It improves readability.
No activity results to display
Show More
Leave a comment: