Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » strcpy issue
strcpy issue [message #46726] Wed, 20 July 2016 17:44 Go to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

the following code involving a silly STRCPY crash my application in release mode (upp 9994, 64 bit, gcc , c++11, lubuntu 16.04)

class Team : Moveable<Team> { 
public:
...
    char hstatus[50]; 
...
    Team();
    ~Team(){;}
};

......

sql.Execute("SELECT * FROM TEAMS order by N");
while(sql.Fetch()) {
   Team& t = VTeam.Add( (int)sql[N] );
    ...	
   strcpy (t.hstatus, (String) sql[HSTATUS] );   //<=== crash!
    ...	
}


instead works in debug mode.
On windows, 32 bit, old upp no c++11, it works too.
hstatus cannot be a String (I need to modify its content char by char when needed).

What is wrong in that innocent line?
Thanks,
Luigi
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Nightly packages compilation error
Next Topic: Vector(const Vector& v, int)
Goto Forum:
  


Current Time: Tue May 21 07:13:52 CEST 2024

Total time taken to generate the page: 0.01508 seconds