so i have this code that i had used in c++, but i don't know what i should i use in java...
These are the errors for the above:Code:public String getStringMessageID()
{
ostringstream temp;
temp << messageId;
return temp.str();
}
ostringstream cannot be resolved to a type Assignment 10/src Messages.java line 114 1209617205928 8023
Syntax error on token "<<", invalid AssignmentOperator Assignment 10/src Messages.java line 115 1209617205929 8024
I also have another error which i dont know what to do about, but would love some help on
Here is the error i get for this one:Code:static void sortArray(Message msg[], int size)
{
Message temp;
boolean swapped = true;
int count = 0;
for(int index = 0; index < size && swapped; index ++)
{
swapped = false;
for(int i = 0; i < (size - 1) - count; i ++)
{
if (msg[i].getDate() > msg[i + 1].getDate())
{
swapped = true;
temp = msg[i];
msg[i] = msg[i + 1];
msg[i + 1] = temp;
}
}count ++;
}
}
The operator > is undefined for the argument type(s) java.lang.String, java.lang.String Assignment 10/src Mailbox.java line 90 1209618068710 8102
If you would like to see the rest of the code just let me know and i will post it
