User Profile

Collapse

Profile Sidebar

Collapse
PaperPilot
PaperPilot
Last Activity: Aug 3 '07, 12:31 PM
Joined: Nov 9 '06
Location: Houston, Texas
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • PaperPilot
    replied to Program can't find class in .jar file
    in Java
    I have tried every possible form of the CLASSPATH system variable including the path to another version of mm_mysql-2_0_4-bin.jar to no avail. My problem is something other than the CLASSPATH.

    Thanks....
    See more | Go to post

    Leave a comment:


  • PaperPilot
    started a topic Program can't find class in .jar file
    in Java

    Program can't find class in .jar file

    I have a Java program that is deployed as a .jar file in which is another .jar file with the mysql library. Here is the appropriate section of code:

    Code:
       /**
    	* Makes the connection to the database.
    	*/
       protected static Connection makeConnection()
       {
    	  try
    	  {
    		 Class.forName("org.gjt.mm.mysql.Driver");
    
    		 database = DriverManager.getConnection(
    			   dataBaseName,
    ...
    See more | Go to post

  • Thanks, this will do. I can live with templates in the header file. I just wish I knew why the nongeneric code wouldn't separate. I just can't stand loose ends....
    See more | Go to post

    Leave a comment:


  • Dividing a namespace into declaration and elaboration parts

    We started out using Tornado because it worked with 5.4 and the Motorola M68040 board. Other programmers on this project had been using Tornado with ADA on a companion system. I didn't put much effort into Tornado because I knew I would have to use Workbench when we converted to the PPC board and vxWorks 6.3. I began coding my section using Eclipse, CDT, and mingw on a...
    See more | Go to post
    Last edited by PaperPilot; Feb 13 '07, 04:57 PM. Reason: Put forgotten code in code box

    Leave a comment:


  • I am using the gnu complier for the PPC604 which creates a partially linked object. Final linking happens during load. The IDE is Eclipse 3.1.2 using Wind River Systems Workbench 2.5b plugins. The target system uses vxWorks 6.3....
    See more | Go to post

    Leave a comment:


  • Adrain:

    I tried both methods you suggested, putting elaboration code in a .cpp file. It compiled fine, but failed to link. There must be some step I am leaving out....
    See more | Go to post

    Leave a comment:


  • Dividing a namespace into declaration and elaboration parts

    I have this namespace which works fine if I put everything in the header file:

    Code:
    namespace util
    {
    
    	float getFloat(char* buf, int from);
    	bool  getBool(char* buf, int from);
    	short getShort(char* buf, int from);
    
    
    float getFloat(char* buf, int from)
    {
    	buf+=from;
    	
    	float tempVal;
    	memcpy(&tempVal, buf , sizeof(float));
    	
    	return tempVal;
    ...
    See more | Go to post

  • PaperPilot
    replied to Combining char array into other data types
    in C
    I am getting data from the user interface (a Java program running on a PC) via TCP. When I received Mach which I know to be 0.63, the routine displayed 63. The altitude was 24905, but displayed 70.

    I finally got it to work using the following:
    Code:
    float IcInterface::getMach()
    {
      return getFloat(buffer_, 0);	  //mach
    }
    
    float IcInterface::getAltitude()
    {  
      return getFloat(buffer_,
    ...
    See more | Go to post

    Leave a comment:


  • PaperPilot
    replied to Combining char array into other data types
    in C
    I couldn't get past:

    float mach = float(*inBufr);

    I tried casting, but didn't get any farther. Moving the data into an array didn't help either. The only one that worked was:

    bufrPtr = reinterpret_cas t<bool *>( inBufr );

    But it only casts a char to bool....
    See more | Go to post

    Leave a comment:


  • PaperPilot
    started a topic Combining char array into other data types
    in C

    Combining char array into other data types

    It's me again:

    I have to write some classes that have a pointer to chars and must combine them into other data types. For example:

    Code:
    void IcInterface::setData(char *inBufr)
    {
    	 float mach = *inBufr;
    	 inBufr += 4;
    	 float altitude = *inBufr;
    	 inBufr += 4;
    	 short runwayNumber = *inBufr;
    }
    Every method I tried gave me a run-time error on the target machine (a PPC...
    See more | Go to post

  • PaperPilot
    replied to Do I need to size a vector before copying.
    in C
    The professor and I have looked at this other post several times. Althought it looks similar, there are perhaps several differences. Here is my caller:
    Code:
    //Check if the socket is connected
    	 if (commandClient->isConnected() == true)
    	   cout << "connected to port 3940 by client "<< commandClient->getClientAddress()
    		 << endl;
    	 else
    	   cout << "Not connected
    ...
    See more | Go to post

    Leave a comment:


  • PaperPilot
    replied to Do I need to size a vector before copying.
    in C
    I finally got my 15 or 20 minutes on the target. After adding the reserve instruction, the result was the same. The professor suggested I loop a back_inserter, but this seems an ugly solution. I want copy to work. What should I look for that is screwing up my copy?...
    See more | Go to post

    Leave a comment:


  • PaperPilot
    replied to Do I need to size a vector before copying.
    in C
    He's not my inststructor. I call him the professor because he teaches at the local college. I am an old assembly language programmer forced to write C++ code. About half of the suggestions he gives me don't work. We are on this task together. Of course, the code with the reserve instruction compiles; this is a run-time error and I can only check it out in the lab, on the target machine. I am concerned that, even if the revised code works, it...
    See more | Go to post

    Leave a comment:


  • PaperPilot
    started a topic Do I need to size a vector before copying.
    in C

    Do I need to size a vector before copying.

    I am getting an alignment error when I copy data from a buffer into a vector.

    Code:
    std::copy(inBufr, inBufr+(size * sizeof(WindsTableElement)), 
    windIterator_=wt_.begin());
    The professor tells me I need to use reserve (size_type n) to set the size of the vector before copying. Is this necessary?

    Thanks in advance.
    See more | Go to post

  • PaperPilot
    replied to Problem defining vector iterator
    in C
    Thanks, your analysis was partially right; it set me on the right track. I defined the problem code above the class definition. I moved this:
    Code:
    WindTable wt_;
    WindTable::iterator windIterator_;
    inside the class definition. The typedef defining WindTable had to remain where it was. I am not sure why, but now it works....
    See more | Go to post

    Leave a comment:


  • PaperPilot
    replied to Problem defining vector iterator
    in C
    That's what I would have thought, but a search shows that these variables only show up in one .cpp file....
    See more | Go to post

    Leave a comment:


  • PaperPilot
    started a topic Problem defining vector iterator
    in C

    Problem defining vector iterator

    I have defined a vector and its iterator as such:
    Code:
    typedef std::vector< WindsTableElement > WindTable;
    WindTable wt_;
    WindTable::iterator windIterator_;
    I get no errors during compile, but during linking I get:


    What am I doing wrong?

    Thanks in advance....
    See more | Go to post

  • PaperPilot
    replied to VxWorks socket class
    in C
    This site isn't much help as my problem is with the VxWorks libraries. I am hoping somebody on the forum knows of a VxWorks specific socket class.

    I will keep looking.

    Thanks for your help....
    See more | Go to post

    Leave a comment:


  • PaperPilot
    started a topic VxWorks socket class
    in C

    VxWorks socket class

    Hi All:

    I need some help with TCP sockets on VxWorks.

    Does anybody know of a C++ socket class that works on VxWorks. This would be dead easy with Java, but management over my objections, decided to use C++ and I have to make the code work.

    All help is appreciated.
    See more | Go to post

  • PaperPilot
    replied to Incrementing a pointer
    in C
    Incrementing a pointer



    Here is the error mesage:

    d:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algobase.h: 247: error: no match for 'operator=' in '(&__result)->std::ostream_i terator<_Tp, _CharT, _Traits>::opera tor* [with _Tp = float, _CharT = char, _Traits = std::char_trait s<char>]() = *__first'
    d:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stream_iterator .h:192:...
    See more | Go to post
    Last edited by PaperPilot; Jan 8 '07, 06:21 PM. Reason: Need to add error message

    Leave a comment:

No activity results to display
Show More
Working...