Click here to Skip to main content
15,911,141 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
Generalimport .jpg file Pin
ursus zeta19-Feb-05 11:05
ursus zeta19-Feb-05 11:05 
Generalproblem in graphics Pin
18-Feb-05 6:13
suss18-Feb-05 6:13 
GeneralRe: problem in graphics Pin
ursus zeta19-Feb-05 11:17
ursus zeta19-Feb-05 11:17 
GeneralRe: problem in graphics Pin
sunibigyana20-Feb-05 6:44
susssunibigyana20-Feb-05 6:44 
GeneralRe: problem in graphics Pin
ursus zeta24-Feb-05 10:58
ursus zeta24-Feb-05 10:58 
Generalkindly help me with this errors: Pin
jedskie_a17-Feb-05 6:19
jedskie_a17-Feb-05 6:19 
GeneralRe: kindly help me with this errors: Pin
ursus zeta19-Feb-05 11:11
ursus zeta19-Feb-05 11:11 
GeneralApplication quits prematurely Pin
SACHITHA16-Feb-05 22:59
SACHITHA16-Feb-05 22:59 
I coded a bubble sort (below) and it works when I run it through Visual C++ but when I open it manually in XP the window opens and lets the user enter data and it quits quickly afterwards without displaying the output.

#include <iostream>
#include <iomanip>

using namespace std;

//Macro for max size of array
#define MAX 50
int Array[MAX];

int main()
{
cout << "\n----------------BINARY SORT ALGORITHM-------------------\n" << endl;

//Code for entering data into array
cout << "Enter up to " << MAX << " integers. " << "(Quit with any letter):\n" << endl;
for(int i = 0; i < MAX && cin >> Array[i]; ++i)
;

int ArraySize = i;

//Display Array
cout << "\nArray Size:- " << ArraySize << "\n" << "\nArray:- ";
for(int ii = 0; ii < ArraySize; ii++)
{
cout << setw(5) << Array[ii];
}

cout << "\n\n";

//Flag to show if sorted or not
bool Sorted = false;

//Temporary store whilt swapping
int Swap;

while( !Sorted )
{
Sorted = true;

for(int iii = 0; iii < ArraySize; ++iii)
{
if( Array[iii] > Array[iii + 1])
{
//Prints out current state of array
for(int j = 0; j < ArraySize + 1; j++)
cout << setw(5) << Array[j];

//Swapping code
Swap = Array[iii];
Array[iii] = Array[iii + 1];
Array[iii + 1] = Swap;

cout << "\n";

//Flag false since swapping occured
Sorted = false;
}
}
}

//Output
cout << "\n\n" << "SORTED LIST\n";

//Counter in the loop and condition are adjusted to ignore first element which is always 0 and to include last element
for(int iiii = 1; iiii < ArraySize + 1; iiii++)
cout << setw(5) << Array[iiii];

cout << "\n\n" << endl;

return 0;

}

Thanks
GeneralExpose COM interface from managed C++ Pin
e1e0n16-Feb-05 9:08
e1e0n16-Feb-05 9:08 
GeneralClient/Server Pin
densitet16-Feb-05 6:18
densitet16-Feb-05 6:18 
GeneralPrinter - Escape Sequence Pin
tjuentgen16-Feb-05 1:59
tjuentgen16-Feb-05 1:59 
GeneralRe: Printer - Escape Sequence Pin
Christian Graus16-Feb-05 9:56
protectorChristian Graus16-Feb-05 9:56 
Questionparser? Pin
jedskie_a14-Feb-05 13:26
jedskie_a14-Feb-05 13:26 
AnswerRe: parser? Pin
RNEELY18-Feb-05 8:59
RNEELY18-Feb-05 8:59 
GeneralRe: parser? Pin
jedskie_a18-Feb-05 12:41
jedskie_a18-Feb-05 12:41 
GeneralMeasuring execution time of C functiom Pin
jim198114-Feb-05 9:14
jim198114-Feb-05 9:14 
GeneralRe: Measuring execution time of C functiom Pin
ursus zeta15-Feb-05 7:45
ursus zeta15-Feb-05 7:45 
GeneralRe: Measuring execution time of C functiom Pin
Anonymous16-Feb-05 6:47
Anonymous16-Feb-05 6:47 
GeneralInherieting MFC based objects in .NET Pin
Boy Wunder14-Feb-05 9:04
Boy Wunder14-Feb-05 9:04 
GeneralRe: Inherieting MFC based objects in .NET Pin
ursus zeta15-Feb-05 7:52
ursus zeta15-Feb-05 7:52 
GeneralRe: Inherieting MFC based objects in .NET Pin
Anonymous15-Feb-05 10:10
Anonymous15-Feb-05 10:10 
GeneralRe: Inherieting MFC based objects in .NET Pin
RNEELY18-Feb-05 8:11
RNEELY18-Feb-05 8:11 
GeneralStrange compile problem Pin
Yaakov Davis12-Feb-05 9:00
Yaakov Davis12-Feb-05 9:00 
GeneralRe: Strange compile problem Pin
Anonymous14-Feb-05 5:47
Anonymous14-Feb-05 5:47 
GeneralRe: Strange compile problem Pin
Anonymous14-Feb-05 6:02
Anonymous14-Feb-05 6:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.