Jump to content

  • Log In with Google      Sign In   
  • Create Account

Manhattanisgr8

Member Since 13 Nov 2007
Offline Last Active Oct 15 2014 10:09 PM

Posts I've Made

In Topic: Help with ArrayList Java

16 August 2014 - 01:02 PM

Thanks guys. The combination of using ArrayList<Object> and then casting the Object to a specific class type worked. You guys saved me several hours of coding. I can't thank you guys enough.


In Topic: Help with ArrayList Java

16 August 2014 - 03:23 AM

Thank you megadan, I now have it reading the ArrayList using Class<?>. Now my problem is adding elements to an ArrayList<Class> from ArrayList<Class<?>>.

 

Example:

ArrayList<Moves> moves;
ArrayList<Class<?>> importedMoves;

for (int x = 0; x < importedMoves.size(); x++){
moves.add(importedMoves.get(x));

Is there a way around this?


In Topic: Need help with installation of program

21 April 2014 - 03:55 PM

Forgot to mention that I am targeting Windows users. In the manual, I am going to instruct the users how to use it in Linux via makefile due to the lack of information I was finding on the internet for packaging distros.


In Topic: Need help with installation of program

21 April 2014 - 03:52 PM

I didn't even think about the permissions. I was having the installer put it into the program files folder in the windows directory. Could I perhaps have the program write to the public folder in users? If so would the following statement be correct?:

outFile.open("C:\\Users\\Public\\Documents\\ProductManager\\inventory.txt");

In Topic: C++ Need help with fstream

21 April 2014 - 03:12 PM


Specifically, when you read something from a line with operator >>, you are not consuming the new-line character at the end of the line. The next getline call will then see an empty line.

 

Thanks Alvaro, I fixed the problem I was having by consuming the newline character with cin.ignore() before it looped back around to the getline() statement.


PARTNERS