C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #31  
Old November 21st, 2006, 06:44 AM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
Hi joelw

For getting the scores going the other way, just change this:

Code:
for ( int i = 0; i < amount - 1; i++ )
{
     for ( int j = ( i + 1 ); j < amount; j++ )
     {
           if ( scores[i] < scores[j] )
           {
                temp = scores[i];
	        posTemp = scorePos[i];
                scores[i] = scores[j];
		scorePos[i] = scorePos[j];
                scores[j] = temp;
	        scorePos[j] = posTemp;
            }
      }
}


to this:
Code:
for ( int i = 0; i < amount - 1; i++ )
{
     for ( int j = ( i + 1 ); j < amount; j++ )
     {
           if ( scores[i] > scores[j] )
           {
                temp = scores[i];
	        posTemp = scorePos[i];
                scores[i] = scores[j];
		scorePos[i] = scorePos[j];
                scores[j] = temp;
	        scorePos[j] = posTemp;
            }
      }
}


You might not of noticed much difference. The test condition is now testing for scores[i] > score[j]. That's all there is to it.

Reply With Quote
  #32  
Old November 21st, 2006, 07:27 AM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
ok thanks and then i just work my functions around it?

Reply With Quote
  #33  
Old November 21st, 2006, 07:51 AM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
Yes, it will be easy to build your code around that. If you need help you can ask.

Reply With Quote
  #34  
Old November 21st, 2006, 08:10 AM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
i know ive been trying to work my code around it all day and im having know luck.

here is my old code
Code:
#include <iostream>

// just pass the address of the array - see below
void sortArray( double arr[], int sz );
// instead of a reference - see below, you will run
// into all sorts of problems with it being dynamic
// void sortArray( double ( &arr[] ), int sz );
void displayArray( double arr[], int sz );


int main()
{
    double *scores, total = 0;  // average;
    int count;
    int numAmount;
    
	std::cout << "How many test scores are you going to record? ";
	std::cin >> numAmount;
    scores = new double[numAmount];
    
	std::cout << "Please enter in your test scores below.\n";
    for ( count = 0; count < numAmount; count++ )
    {
        std::cout << "Test Score " << (count + 1) << ": ";
        std::cin >> scores[count];
    }
	
	// pass the address and the size of the array
	// scores is a pointer for the address of scores[0]
	sortArray( scores, numAmount );
	displayArray( scores, numAmount );
	
	delete [] scores;

	return 0;
}

void sortArray( double arr[], int sz )
{
	// your sorting algorithm here....
}

void displayArray( double arr[], int sz )
{
	std::cout << std::endl;  // for spacing
	for ( int i = 0; i < sz; i++ )
	{
		std::cout << "Score " << ( i + 1 ) << " : ";
		// prints out a score and then moves down to
		// the next line so you have
		// score 1 : 20.2
		// score 2 : 10.2 etc...
		std::cout << arr[i] << std::endl;
	}
}


how do i work in this part of code without screwing everything up?
Code:
for ( int i = 0; i < amount - 1; i++ )
{
     for ( int j = ( i + 1 ); j < amount; j++ )
     {
           if ( scores[i] > scores[j] )
           {
                temp = scores[i];
	        posTemp = scorePos[i];
                scores[i] = scores[j];
		scorePos[i] = scorePos[j];
                scores[j] = temp;
	        scorePos[j] = posTemp;
            }
      }
}

Reply With Quote
  #35  
Old November 21st, 2006, 08:38 AM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
Here you go:

Code:
#include <iostream>

void sortArray( double arr[], int sz, int scoresPos[], int size );
void displayArray( double arr[], int sz, int scoresPos[], int size );


int main()
{
    double *scores, total = 0;  // average;
	
    int count;
    int numAmount;
    
    std::cout << "How many test scores are you going to record? ";
    std::cin >> numAmount;
    scores = new double[numAmount];
    int *scorePos = new int[numAmount];

    std::cout << "Please enter in your test scores below.\n";
    for ( count = 0; count < numAmount; count++ )
    {
        std::cout << "Test Score " << (count + 1) << ": ";
        std::cin >> scores[count];
	scorePos[count] = count + 1;
    }
	
	// pass the address and the size of the array
	// scores is a pointer for the address of scores[0]
	sortArray( scores, numAmount, scorePos, numAmount );
	displayArray( scores, numAmount, scorePos, numAmount );
	
	delete [] scores;
	delete [] scorePos;

	return 0;
}

void sortArray( double arr[], int sz, int scoresPos[], int size )
{
    double temp = 0;
    int posTemp = 0;

    for ( int i = 0; i < sz - 1; i++ )
    {
        for ( int j = ( i + 1 ); j < sz; j++ )
	{
            if ( arr[i] > arr[j] )
           {
                temp = arr[i];
		posTemp = scoresPos[i];
                arr[i] = arr[j];
		scoresPos[i] = scoresPos[j];
                arr[j] = temp;
		scoresPos[j] = posTemp;
           }
        }
     }
}

void displayArray( double arr[], int sz, int scoresPos[], int size )
{
	std::cout << std::endl;  // for spacing
	for ( int i = 0; i < sz; i++ )
	{
		std::cout << "Score " << scoresPos[i] << " : ";
		std::cout << arr[i] << std::endl;
	}
}

Reply With Quote
  #36  
Old November 21st, 2006, 08:54 AM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
that works now what happen to my average of the test scores?

Reply With Quote
  #37  
Old November 21st, 2006, 09:02 AM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
Where do you want your average? Inside another function or do you want a new function to calculate the average?

Reply With Quote
  #38  
Old November 21st, 2006, 09:05 AM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
well i would like another function that gives me the average and the with in the same function i would like to have the lowest score dropped from the average.

Reply With Quote
  #39  
Old November 21st, 2006, 09:05 AM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
You could display the average along with displaying the scores. Just change your displayArray function to this:

Code:
void displayArray( double arr[], int sz, int scoresPos[], int size )
{
	double average = 0;
	double sum = 0;

	std::cout << std::endl;  // for spacing
	for ( int i = 0; i < sz; i++ )
	{
		std::cout << "Score " << scoresPos[i] << " : ";
		std::cout << arr[i] << std::endl;
		sum += arr[i];
	}

	average = sum / sz;

	std::cout << "\nThe average score is: " << average << std::endl;
}

Reply With Quote
  #40  
Old November 21st, 2006, 09:24 AM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
that works now, out of the average score i want to drop the lowest score how do i do that?

Reply With Quote
  #41  
Old November 21st, 2006, 09:26 AM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
What do you mean by drop the lowest? You don't want the lowest displaying, or you want to write over the lowest?

Reply With Quote
  #42  
Old November 21st, 2006, 09:34 AM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
when calculating the the test scores average i want the lowest test score not encluded in averaging the test scores.

Reply With Quote
  #43  
Old November 21st, 2006, 09:53 AM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
Put another loop inside your displayArray function to do the average. Your lowest score will be at position arr[0] after the array has been sorted. So you start your averaging at array[1]. Like this:

Code:
void displayArray( double arr[], int sz, int scoresPos[], int size )
{
	double average = 0;
	double sum = 0;

	std::cout << std::endl;  // for spacing
	for ( int i = 0; i < sz; i++ )
	{
		std::cout << "Score " << scoresPos[i] << " : ";
		std::cout << arr[i] << std::endl;
	}
	
	int j;
	for ( j = 1; j < sz; j++ )
	{
		sum += arr[j];
	}

	average = sum / j;

	std::cout << "\nThe average score is: " << average << std::endl;
}

Last edited by Paul820 : November 21st, 2006 at 10:17 AM.

Reply With Quote
  #44  
Old November 21st, 2006, 11:15 AM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
now that will in fact drop the lowest score out of the average?

Reply With Quote
  #45  
Old November 21st, 2006, 11:28 AM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
Your lowest score after the sorting has been done is at arr[0], the loop to calculate the average starts at arr[1], one above arr[0]. So your lowest score does not get used. The average is the sum of all the other scores divided by the j counter. The j counter is one less that the total size of the original array. Which is what you want.

arr[0] = 10.2 <-- This does not get included.
arr[1] = 22.8 <-- j starts counting from here
arr[2] = 33.6
arr[3] = 44.3 <-- j stops counting here. The sum is from arr[1] to
arr[3] so the avg is the sum / j ( or 3 )

Reply With Quote
  #46  
Old November 21st, 2006, 11:35 AM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
i see thanks

Reply With Quote
  #47  
Old November 21st, 2006, 11:38 AM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
hey i was wondering if i had another question for you with another program i wrote can you help me out with stacking the ascending order for me?

Reply With Quote
  #48  
Old November 21st, 2006, 11:48 AM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
I'll have a look.

Reply With Quote
  #49  
Old November 21st, 2006, 11:54 AM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
ok i want to just like my other program have in this case the months displayed in descending order this time such as:
month 3: 50
month 1: 30
month 2: 10

instead of 50,40,30,20?

heres my code!

Code:
#include <iostream>
#include <iomanip>

using namespace std;

// Function prototypes
double sumArray(double array[], int size);
double getHighest(double array[], int size);
double getLowest(double array[], int size);
void sortArray(double (&array)[12], int size); // send array by reference
void showArray(double array[], int size);

int main()
{
    const int MONTHS = 12;
    int values[MONTHS]      = {12,11,10,9,8,7,6, 5, 4, 3, 2,1 };
    double amount[MONTHS] = {12,34,3, 6,5,7,4,44,43,40,41,9 };

    double total;    // To hold the total rainfall
    double average;    // To hold the average rainfall
    double highest;    // To hold the highest rainfall amount
    double lowest;    // To hold the lowest rainfall amount
    
    cout << "Enter the rainfall for each month.\n";
    for (int count=1; count<=MONTHS; count++)
    {
        cout << "Month " << count << ": ";
        cin >> amount[count];
    }
    
    // Get the total monthly rainfall
    total = sumArray(amount, MONTHS);
    
    // Calculate the average rainfall
    average = total / MONTHS;
    
    // Find the highest monthly rainfall
    highest = getHighest(amount, MONTHS);
    
    // Find the lowest monthly rainfall
    lowest = getLowest(amount, MONTHS);
    
    // Display the results
    cout << fixed << showpoint << setprecision(2);
    cout << "The total monthly rainfall is "  << total << " inches" << endl;
    cout << "The average monthly rainfall is "  << average << " inches" << endl;
    cout << "The highest monthly rainfall is "  << highest << " inches" << endl;
    cout << "The lowest monthly rainfall is "  << lowest << " inches " << endl;          
    cout << "The monthly rainfall in descending order:\n";
    sortArray(amount, MONTHS);
    showArray(amount, MONTHS);
    system("PAUSE");
    return EXIT_SUCCESS;
 
}
 
//**************************************************  ****************
// Definition of sumArray                                          *
// This function accepts a double array and its size               *
// as arguments. The sum of the array's elements                   *
// is returned as an double.                                       *
//**************************************************  ****************
double sumArray(double array[], int size)
{
    double total = 0;
    for (int count = 0; count < size; count++)
        total += array[count];
    return total;
}

//**************************************************  ****************
// Definition of getHighest                                        *
// This function accepts a double array and its size               *
// as arguments. The highest value in the array is                 *
// returned as an double.                                          *
//**************************************************  ****************
double getHighest(double array[], int size)
{
    double highest;
       
    highest = array[0];
    for (int count = 1; count < size; count++)
    {
        if (array[count] > highest)
            highest = array[count];
    }
    return highest;
}
//**************************************************  *****************
// Definition of getLowest                                          *
// This function accepts a double array and its size                *
// as arguments. The lowest value in the array is                   *
// returned as an double                                            *
//**************************************************  *****************
double getLowest(double array[], int size)
{
    double lowest;
       
    lowest = array[0];
    for (int count = 1; count < size; count++)
    {
        if (array[count] < lowest)
            lowest = array[count];
    }
    return lowest;
}
 
//**************************************************  *****************
// Definition of function sortArray                                 *
// This function performs an descending order selection sort on     *
// array. elems is the number of elements in the array.             *
//**************************************************  *****************
void sortArray(double (&array)[12], int elems)
{
    int first, temp;

    for (int i=elems-1; i>0; i--)
    {
        first = 0;
        for (int j=1; j<=i; j++)
        {
            if (array[j] < array[first])
                first = j;
        }
        temp = array[first];
        array[first] = array[i];
        array[i] = temp;
    }
}
 

//**************************************************  ******************
// Definition of function showArray.                                 *
// This function displays the contents of array. elems is the        *
// number of elements.                                               *
//**************************************************  ******************
void showArray(double array[], int elems)
{
    for (int count = 0; count < elems; count++)
        cout << array[count] << " ";
    cout << endl;
}

Reply With Quote
  #50  
Old November 21st, 2006, 12:15 PM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
Your array count is wrong. You are accessing parts of the memory you are not allowed. When i run that, the compiler complains:

Quote:
stack around the variable 'values' was corrupted


arrays start counting at 0. You have your loop starting at 1.

Code:
for (int count=1; count<=MONTHS; count++)
{
    cout << "Month " << count << ": ";
    cin >> amount[count];
}

Reply With Quote
  #51  
Old November 21st, 2006, 12:19 PM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
so switch the loop to 0?

Reply With Quote
  #52  
Old November 21st, 2006, 12:26 PM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
Like this:

Code:
cout << "Enter the rainfall for each month.\n";
for ( int count = 0; count < MONTHS; count++ )
{
    cout << "Month " << ( count + 1 ) << ": ";
    cin >> amount[count];
}


Why are you putting values entered by the user into the array 'amount' when the array 'amount' already has values in it? Are you meaning to do that?

Reply With Quote
  #53  
Old November 21st, 2006, 12:41 PM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
basically what i am doing is adding a sort function that will allow the rainfall amounts from highest amount to lowest amount why you didnt think i should have done that? are you able to exe my program yet or no?

Reply With Quote
  #54  
Old November 21st, 2006, 12:43 PM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
how would you do it?

Reply With Quote
  #55  
Old November 21st, 2006, 12:51 PM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
I just thought you might of done it by accident. There is no need to put values into your amount[MONTHS] array. You can just leave it empty, unless you are meaning to do that:

Code:
double amount[MONTHS];


Your program ask's for memory to hold 12 values of type double. Yes your program runs fine now the loop is fixed.

Reply With Quote
  #56  
Old November 21st, 2006, 12:54 PM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
Now all you need to do is keep the positions of the numbers entered like your last project. But you don't need to dynamically allocate the position array because you know the size. It's 12. When you print out the month's values, just put endl to move it to the next line.

Then it will read:

Month 1: 1.7
Month 4: 2.6

Etc..etc..

Reply With Quote
  #57  
Old November 21st, 2006, 01:00 PM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
im still getting an error that says expected constructor, destructor, or type conversion before '=' token

and do i create a function to create the descending order for the months?

Reply With Quote
  #58  
Old November 21st, 2006, 01:06 PM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
Where does it say the error is? Can you double click the error message to find out what line it's on? Or does it have a line number where the error is? You could do your position thing like your last project. Inside the sorting array. Print out the position and the value of the month.

Reply With Quote
  #59  
Old November 21st, 2006, 01:09 PM
joelw joelw is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 67 joelw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 55 m 47 sec
Reputation Power: 12
yeah total = sumArray(amount, MONTHS);

Reply With Quote
  #60  
Old November 21st, 2006, 01:19 PM
Paul820 Paul820 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Location: United Kingdom
Posts: 428 Paul820 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 7 h 55 m 4 sec
Reputation Power: 13
I'm not getting any errors, take a look at the screenshot. Works ok so far:
Attached Images
File Type: jpg 2006-11-21_191633.jpg (50.5 KB, 178 views)

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Need help with dynamically allocating an array


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap