Find the answer to your Linux question:
Results 1 to 2 of 2
Hello all Our gcc binary was ported from version 2.95 to 4.1.2 . Now the following call to string.assign crashes with no clues . Can anyone please throw light on ...
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    1

    std::string.assign crashes in gcc 4.1.2...help me

    Hello all
    Our gcc binary was ported from version 2.95 to 4.1.2 . Now the following call to string.assign crashes with no clues . Can anyone please throw light on this..?
    Here strMacAddress is std::string type and macAddress is char[18] ..

    strMacAddress.assign(macAddress); <--- crash here ..

    Is there anyway I can analyse the situation in right direction ?

    Thanks in advance
    D babu

  2. #2
    Trusted Penguin Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,393
    Is macAddress null terminated correctly?

    What happens if you try the assignment operator, e.g.
    Code:
    strMacAddress = macAddress;
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...