Search Results

Showing results 1 to 18 of 18
Search took 0.01 seconds.
Search: Posts Made By: AstroNox ; Forum: C++ and child forums
Forum: C++ Mar 29th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
Sort array? Which array?

Try this out anyway, I fixed a logic error. Hope this helps.
void SortAverage ()
{
int mvt[MAXMEMBERS];
for (int i = 0; i < numPlayers - 1; ++i)
{
double max =...
Forum: C++ Mar 28th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
This is as simple as I can go without breaking the logic...
fin >> judgeNumber[i][j];
if (!fin || judgeNumber[i][j] == -1)
{
judgeCount[i] = j;
break;
}

fin >>...
Forum: C++ Mar 28th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
I know how to do a selection sort algorithm, no worry on that. But I need answers to those two questions...
Are you sure you want it descending?
Do you want the sort to reshuffle ALL the arrays,...
Forum: C++ Mar 28th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
Before I start working on those, let me confirm these:
You want the sort to be descending, according to average. This means if I have:
4, 6, 3, 8, 1, 5, 7
You want it to be sorted as:
8, 7, 6,...
Forum: C++ Mar 28th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
What do you want to sort? And how do you want it sorted (ascending, descending etc.)?
Forum: C++ Mar 28th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
Finally got my C++ compiler working. I've compiled the code and fixed some small compilation warnings:
#include <iostream>
#include <fstream>
#include <cstdlib>

using namespace std;

// Const...
Forum: C++ Mar 28th, 2006
Replies: 21
Views: 2,737
Posted By AstroNox
Erm, you can only set the font size and font whatever if you save the file in a format that provides some extension on formatting, say, like Rich-Text Format (RTF), Hypertext Markup Language (HTML...
Forum: C++ Mar 28th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
Hey lsu420luv,

Sorry for the reply like 8 hours later. You see, I live in Singapore and the reply you gave was at 4am SGT. Was asleep by then.

From what I saw in your previous post, I think you...
Forum: C++ Mar 27th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
You might want to add two more global array variables first, assuming you need the unweighted and weighted:
int average[MAXMEMBERS];
int weightedScore[MAXMEMBERS];
Then you can calculate for each...
Forum: C++ Mar 27th, 2006
Replies: 5
Views: 2,518
Posted By AstroNox
I would suggest that you call the super implementation of new and delete, if that's possible. You must know that these operators are not mere malloc's and free's. Apart from Googling the source for...
Forum: C++ Mar 27th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
You need to have the underlined portion in your condition, as mentioned in my previous post:
void PrintReport(ofstream& fout)
{
for (i = 0; i < MAXMEMBERS; i++)
{
fout << "Piano Player: ";...
Forum: C++ Mar 27th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
That has already been done in my previous post (look at the underlined portion):
int ReadScores (ifstream& fin)
{
int i;
for (i = 0; fin && i < MAXMEMBERS; ++i)
{
if (!(fin >>...
Forum: C++ Mar 27th, 2006
Replies: 1
Views: 3,057
Posted By AstroNox
I assume this is a directed graph because the file states two opposite edges for any two nodes.

You do something along this line:
ifstream fin("myfile.txt");
if (!fin)
cout << "Error" << endl;...
Forum: C++ Mar 27th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
Sorry, but I do not fully understand what you have posted (no, I'm not pointing out the spelling mistakes):

What do you mean by "sentinal control"?


What do you mean by "disply the filled...
Forum: C++ Mar 26th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
It's not printing anything because you did not call the PrintReport method?

Your reading method seems to be flawed. Try this method (it's a modified version what I wrote earlier):
int ReadScores...
Forum: C++ Mar 26th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
Five arrays... well you could try your original method I guess. What more can I say since the situation is like that...
Forum: C++ Mar 26th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
That's possible, but it could become very messy. It might be better to have three arrays, one for the judge ID, another for the score, and the last for the student ID. This student ID will allow you...
Forum: C++ Mar 26th, 2006
Replies: 50
Views: 8,113
Posted By AstroNox
Hey lsu420luv, I would suggest the following way of implementing this part of your project. You would have to implement the output file logic yourself.
typedef std::map<int, float> Ratings; // Use...
Showing results 1 to 18 of 18

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC