- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 5
- Posts with Upvotes
- 3
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I'm trying to learn Java, pretty easy so far as my previous experiance is with C/C++. I was just curious how to call java classes from different files. That way I don't have to have main as well as all of my classes crammed into one file. I'm sure the … | |
I have a test in computer graphics and I was wondering if someone could confirm my understanding of the Scan-Line fill. I just had a question of the special case of when an edge is a relative max or min. I know if that is the case the edge must … | |
Re: Python could be a good start for you. It has a different syntax and it is pretty fun to play with. | |
Re: Look at setw(). It sets the width of text. A Google search will provide an explanation and examples. | |
Re: The easiest way would not be not to store the password but a hash of the password. That way even if your packets are sniffed the person only sees garbage. When the user creates a password or logs in you can hash the password prior to sending it over the … | |
Re: The method is overloaded to handle character arrays but not overloaded for any other array. [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/io/PrintStream.html"]http://download.oracle.com/javase/1.4.2/docs/api/java/io/PrintStream.html[/URL] | |
I should remember this but I am rusty. I'm passing a char* [] to a function which will hold data that I have extracted using strtok. I've tested the output and it is doing what it is suppose to, at least it is inside of the function. As soon as … | |
Re: why do you write method two to accept integers and then pass it a float? | |
In reguards to the remove function, what happens if you remove and item from the middle of this list? For example, say the list size was 5 (elements 0 - 4) and element 3 was removed. Would element 3 now contain a null value or would everything past element 3 … | |
Hello, I was wondering how to make a c/c++ program installable on other computers. For example, lets say for some odd reason a friend wanted a hello world program. Obviously, if I complie the code it will only run on my computer. The may be a noobish question, but we … | |
I just have a quick question. I am working on a program for a friend of mine, more specifically a program that keeps track of stats of characters makes rolls etc. for DnD. Anyway, I am going to save the data using Serialization and keep the data together via a … | |
I recently starting learning Java, I have a pretty good grasp on C/C++ and wanted to expand my horizons. Anyway, I have being using the Headfirst Java book and recently finished the chapters on GUI. One thing that wasn't covered by the book was how to deal with child windows. … | |
Hello, I am pretty new to Java so I am following along in a book to learn it. I am currently in the beginnings of making a MIDI player but I have run into to a problem. I am using a sequencer, if I don't close the sequencer the program … | |
Re: [QUOTE=Obsidian_496;1210647]My program has to open a text file. I want it to give an error message if the file does not exist (or has a diferent name, which is the same, really). I'm using a pretty old Borland compiler, because home assingnments are checked with it. Compiler shows me this … | |
I am about to start work on a side project during summer break. Part of the project will require the storage of user's information on a hardrive. I have been exposed to b-trees so I know that is one option for dealing with the data, but what are some other … | |
[CODE]void Graph::writeShortestPaths (int first, ostream& outfile) { for (int i = 0; i < n; i++)// each vertex { currentDistances[i] = 999999; predecessors[i] = -1; toBeChecked[i] = true; } currentDistances[first] = 0; writeShortestPathsHeader (outfile, first); int pass = 0; while (moreShortestPathsToFind()) // see below { int minVertex = first; // … | |
Re: you are calling reverse inside of the for loop, you only need the array to be reversed once so call it outside of the for loop | |
Re: google search ifstream cplusplus.com will tell you all about it with example code. Also put you code in code tags, no a huge deal for that small bit of code but can make it harder to read. | |
Hello, I'm working on a problem (Huffman Tree encoding/decoding) and I need to covert and Int to a char. I was trying to use [CODE] char temp = static_cast <char> (index); //index is an integer [/CODE] it compiles but if I try to print, it crashes so obviously that idea … | |
Probably a dumb question but, How can you tell if a "split" has occurred all the way up a btree? Would it be that the parent pointer would be NULL? Like I said probably a dumb question. I've got my BTreeNode class working (including the add) but the BTree class … | |
Re: here is a start on you what to do: 1. Look up random access files for the function to get the word from the file (you be using seekp or seek g I can't remember) 2. as far as the stars part goes, You could setup a char array and … | |
[CODE]class BTreeNode : public LinkedNode { public: BTreeNode (BTreeNode* child0, int key0, BTreeNode* child1); BTreeNode (const BTreeNode& sibling); bool isNotLeaf (void) const; BTreeNode* findChild (int newKey) const; BTreeNode* addKey (int newKey, BTreeNode* newChild = 0); BTreeNode* getChild (int i) const; void write (ostream& outfile) const; private: void setChild (int i, … | |
Does anyone know where I can find info on setting up dll files to be called by a program? I am about to start a project but I realized it would be helpful if the finished program could be ran without a compiler on every computer it is to be … | |
I am planning on starting a project during summer break. I am going to create a employee clock in system for my work place (and anywhere else that wants it.) I figured it'd be good to get some practical experience before I graduate. The actual structure of the program I … | |
I have a weird file i/o or system() error. Here is the deal, I completed an assignment for threaded trees recently. My professor wanted us to turn in own data set we used to test our tree along with the one he provided for us. I thought I'd be fancy … | |
[CODE]class BinarySearchTree { public: BinarySearchTree (void); bool addRecursively // calls addRecursive (see private) (BinarySearchTreeNode* newAdd); bool addIteratively (BinarySearchTreeNode* newAdd); void writeRecursively // calls writeRecursive (see private) (ostream& outfile) const; void writeIteratively // if implemented, requires a stack - (ostream& outfile) const; // - see oop06 private: void addRecursively (BinarySearchTreeNode* currentRoot, … | |
[CODE]class Array { public: Array (int newSize, int order); Array (const Array& original); ~Array (void); void write (ostream& outfile, char* sortName, char* orderName); int getSize (void); void insertionSort (void); void selectionSort (void); void bubbleSort (void); static void initShellH (void); void shellSort (void); void heapSort (void); void quickSort (void); void mergeSort … | |
Re: do something like [CODE] int j = 0 while (j < num && strcmp(enteredNum, car1[j].r_number) !=0) { j++ } if (j < num) { cout << car1[j].milage << car1.[j].(whatever other data); } else { cout << "car not found\n" }[/CODE] of course that is a lot to cram in a … | |
Re: [CODE]for (j = 0; j < numofgamesinseries; j++) { cout << "Enter player " << i+1 << "'s score " << j+1 << ": "; cin >> score[i][j]; if (score[i][j] < 0 || score[i][j] > 300) { cout << "You entered an invaild score of : " << score[i][j] << … | |
Which would be considering a better coding style, this is for a merge sort in case you are wondering what I am doing with this line of code [CODE] int j = 0; // used to track for the temp array earlier in my code // reset it to be … |