Forum: C++ Dec 30th, 2006 |
| Replies: 1 Views: 11,089 Hello,
I'm working on a stock trading assignment. I have developed the algorithm for trading, and now I need a little help on getting the data from a server.
There's a server that replies to... |
Forum: C Dec 24th, 2006 |
| Replies: 2 Views: 3,076 I'm thinking of using something like BFS, that would just go out and label nodes by degree of closeness to given node, but thats not too efficient, I've also tried Dijkstra approach, because my other... |
Forum: C Dec 24th, 2006 |
| Replies: 2 Views: 3,076 Hi everyone,
I've been working on this for days, but just can't get it. I have a linked-list containing edges of a weighted directed graph, and my goal is to find a path from vertex A to vertex B... |
Forum: C++ Dec 22nd, 2006 |
| Replies: 14 Views: 3,580 I figured
delete [] map;
in Destructor would take care of removing my array.
WaltP, what's the benefit of loading each pointer with structure separately?
~s.o.s~, I do test my code... |
Forum: C++ Dec 22nd, 2006 |
| Replies: 14 Views: 3,580 ~s.o.s~
The project will require me to dynamically allocate memory, not for this array, but for a link list I'll also need to have.
Here's what I've done for this array:
in the header file... |
Forum: C++ Dec 22nd, 2006 |
| Replies: 14 Views: 3,580 For my project I'm using an array of structs that I declared in the header file
struct City{
string name;
int visits;
};
City* map[200]; |
Forum: C Dec 21st, 2006 |
| Replies: 6 Views: 25,353 Salem, thank you!!! All I've done is change the size of
char a[5];
char b[5];
and it seems to be working nicely. Could you please tell me why four characters (like, AAAA or BBBB) require an... |
Forum: C Dec 21st, 2006 |
| Replies: 6 Views: 25,353 Problem is somewhere with End Of File check, but I can't figure out what it is |
Forum: C Dec 21st, 2006 |
| Replies: 6 Views: 25,353 Hello,
I'm trying to read in a txt file that looks like:
AAAA BBBB 1234
CCCC DDDD 4321
....
and here's what I've done so far: |
Forum: C++ Dec 16th, 2006 |
| Replies: 2 Views: 2,810 OK, I got it. Any comments on code quality or improvements are still welcome!
int Sum (char *fileName)
{
char * numEnd;
long temp(0);
int result(0);
string line;
ifstream file (fileName); |
Forum: C++ Dec 16th, 2006 |
| Replies: 2 Views: 2,810 Hello, I'm working o a function that takes a file with binary numbers and returns the sum of those numbers. Here's where I'm now
int Sum (char *fileName)
{
char * numEnd;
long temp(0);
int... |
Forum: C++ Dec 13th, 2006 |
| Replies: 2 Views: 6,308 I think
#include <string>
was the key to my question. Sorry, newb here. |
Forum: C++ Dec 13th, 2006 |
| Replies: 2 Views: 6,308 Hello,
I have a quick question: How do I declare array of strings with a static size entered by user during run time in C++?
In C# i'd do
// Get user unput (int, # of strings);
... |
Forum: C++ Dec 10th, 2006 |
| Replies: 0 Views: 2,127 Hello guys,
I'm working on a maze designer. I start with a 2 dimensional block of cells, and randomly take down walls until there's a path from top left corner to bottom right. My approach is to... |