- Strength to Increase Rep
- +4
- 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:
I want to learn a new programming language, which I can use to create large applications such as operating systems, editing applications. I know it requires a great deal of understanding of contents, but I can not decide which language. it is either C or C++ need advice... :icon_eek: |
|
Re:
so basically i want to be able to organise info in my console application, im a beginner with C++ but im making a server for a game. Basically at the moment the playerlist looks like this: [ICODE]player [32] |Kills: 30 |Deaths: 45 tt [32] |Kills: 222 |Deaths: 2[/ICODE] im using … |
|
Re:
A few friends from school and I are messing around with writing a chat server/client. We are writing it in java, and now we are at the stage where we are trying to get people unique ids and logging in. Just curious as to the best practices for handling user … |
|
Re:
Ok, so you know how, if we want to output the elements of an array to the screen, we have to make a for loop right? So I have the following code... [CODE] char array[] = new char [10]; array[0] = '1'; array[1] = '2'; . . . . array[9] … |
|
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:
[code]public class Test { public static method1(int n, m){ n += m; method2(3.4); } public static int method2(int n){ if (n > 0)return 1; else if (n == 0) return 0; else if (n < 0) return -1; } }[/code] |
|
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:
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:
Does the array fine but when it does the function it wont work, if anyone can help that would be great! [CODE]#include <iostream> using namespace std; void reverse(int a[10], int size) { for (int j=0; j<size/2; j++) { int temp = a[j]; a[j] = a[size-j-1]; a[size-j-1] = temp; } return; … |
|
Re:
char fileName[100]; cout <<" please enter the name of the data file "<< endl; cin>>fileName; ifile.open(fileName); 1 how to put data in the filename (how to put numbers in the filename e.g lets name it sample.txt where to put this sample to be readen by the program 2. how to … |
|
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:
Hello, For this program I have to read a random phrase from a file which will contain an integer at the top describing how many phrases are in the file and then each phrase is blelow that number on a seperate line. I need to select a random phrase from … |
|
[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:
firstly here is the code i'm working on in visual studio [CODE]#include "stdafx.h" #include <iostream> #include <string> using namespace std; struct Car { string r_number,make_of_car,model_of_car; int mileage; int age_of_car; }; void main () { int i,num; Car *car1; cout << "Please enter the number of cars: "; cin >> num; … |
|
Re:
[CODE] #include <cstdlib> #include <iostream> #include <iomanip> #include <stdlib.h> #include <conio.h> #include <stdio.h> using namespace std; void printintromessage (); void getUserInput (char& Y); void calculations (const int& numofgamesinseries, const int& numofplayersonteam, int& i, int& j, int& k, int& l, char& Y); void PrintMax (const int& numofgamesinseries, const int& numofplayersonteam, int& … |
|
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 … |