Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~3K People Reached
Favorite Forums
Favorite Tags
c++ x 9
c x 5
Member Avatar for DynamitMsk

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 the following request: servername stockcost <stockname> and I assume I can use it like: int …

Member Avatar for John A
-1
132
Member Avatar for DynamitMsk

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 going through exactly n nodes. Anyone has suggestions, or links with …

Member Avatar for DynamitMsk
0
109
Member Avatar for DynamitMsk

For my project I'm using an array of structs that I declared in the header file [code] struct City{ string name; int visits; }; City* map[200]; [/code] now when I'm trying to initialize it in a constructor, like [code] for (int ii=0; ii<200; ii++) map[ii].visits = 0; [/code] I get …

Member Avatar for ~s.o.s~
0
142
Member Avatar for DynamitMsk

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: [code] char a[4]; char b[4]; int c; FILE *input= fopen("input.txt", "r+"); if (input==NULL) perror ("Error opening file"); else{ while(feof(input)== 0){ fscanf(input,"%4s",a); fscanf(input,"%4s",b); fscanf(input,"%d",&c); } …

Member Avatar for Salem
0
2K
Member Avatar for DynamitMsk

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 [code] int Sum (char *fileName) { char * numEnd; long temp(0); int result(0); string line; ifstream file (fileName); if (file.is_open()) { while (! file.eof() ) { …

Member Avatar for John A
0
106
Member Avatar for DynamitMsk

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 [code] // Get user unput (int, # of strings); string[] stringArray = new string[numOfStrings]; //tell user to start imputing the string …

Member Avatar for Ancient Dragon
0
186
Member Avatar for DynamitMsk

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 create an adjacency matrix where: -1 means two cells (or 2 groups of …

0
68