Schlosh08's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Contributors
Active Posts:
28 (0.04 per day)
Joined:
03-June 12
Profile Views:
467
Last Active:
User is offline Dec 11 2012 04:24 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Mac
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Who Cares
Dream Kudos:
50
Icon   Schlosh08 has not set their status

Posts I've Made

  1. In Topic: Need Help Converting Java Code to C++

    Posted 5 Sep 2012

    it finally works!! I'm wondering if I should put a print statement with the book names ie: Math, Chem...etc. because here is my current output
     Enter number of Customers: 1
    Constructor reached
    Enter data for Buyer 1
    Enter number of different courses: 2
    Enter the Books Name List: Math Chem
    Enter the Quantity List in the same order as the Book List: 1 1
    
    
    ************************ Sales Summary ************************
    The cost for Customer 1 is: 170
    Destructor reached 
    
  2. In Topic: Need Help Converting Java Code to C++

    Posted 5 Sep 2012

    I now added this code for the loop
       // Allocate storage for holding book-name and price                                  
            CustomerBookName = new string[numCourse];
            CustomerBookQty	= new int[numCourse];
    
            cout <<	"Enter the Books Name List: ";
    	for(int	j=0 ; j<numCourse ; j++){
              cin >> bNames;
              CustomerBookName[j] =	bNames;
    	}
      string BookNameCatalog[NBOOKS] = {"Math", "Phsx", "Chem", "Geo", "Hist"};
      int BookPriceCatalog[] = {100, 85, 70, 65, 60};
    
    
    }
    


    then i received this output
      // Allocate storage for holding book-name and price                                  
            CustomerBookName = new string[numCourse];
            CustomerBookQty	= new int[numCourse];
    
            cout <<	"Enter the Books Name List: ";
    	for(int	j=0 ; j<numCourse ; j++){
              cin >> bNames;
              CustomerBookName[j] =	bNames;
    	}
      string BookNameCatalog[NBOOKS] = {"Math", "Phsx", "Chem", "Geo", "Hist"};
      int BookPriceCatalog[] = {100, 85, 70, 65, 60};
    
    
    }
    


    Sorry, this was the output
     Enter number of Customers: 1
    Constructor reached
    Enter data for Buyer 1
    Enter number of different courses: 2
    Enter the Books Name List: Math Chem
    
    
    ************************ Sales Summary ************************
    The cost for Customer 1 is: 6.48744e+08
    Destructor reached
    
    
  3. In Topic: Need Help Converting Java Code to C++

    Posted 5 Sep 2012

    sorry im very new to c++.. so how should i go about this?
  4. In Topic: Need Help Converting Java Code to C++

    Posted 5 Sep 2012

    I was compiling wrong in the terminal but here is the output
     Enter number of Customers: 1
    Constructor reached
    Enter data for Buyer 1
    Enter number of different courses: 2
    
    
    ************************ Sales Summary ************************
    Book  not found
    Book  not found
    The cost for Customer 1 is: 0
    Destructor reached
    
  5. In Topic: Need Help Converting Java Code to C++

    Posted 5 Sep 2012

    this is still the output I'm getting after adding what you guys said
     Enter number of Customers: 1
    Constructor reached
    nter data for Buyer Enter number of different courses: 3
    
    
    ************************ Sales Summary ************************
    The cost for Customer 1 is: 0Destructor reached 
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Years Programming:
1
Programming Languages:
Java

Contact Information

E-mail:
Private

Friends

Schlosh08 hasn't added any friends yet.

Comments

Schlosh08 has no profile comments yet. Why not say hello?