Thread: adding a copy of a string (not pointer) to vector (struct)

  1. #16
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907
    Remember that strdup is not standard C and may not work on all environments

  2. #17
    Registered User
    Join Date
    Feb 2019
    Posts
    1,078
    Quote Originally Posted by Click_here View Post
    Remember that strdup is not standard C and may not work on all environments
    strdup() isn't defined on ISO 9989, but it is in POSIX/XOPEN/GNU and most compilers (as in Visual Studio, Intel C++ and others).

  3. #18
    null pointer Structure's Avatar
    Join Date
    May 2019
    Posts
    338
    Last edited by Structure; 08-06-2019 at 06:44 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Searching string within vector struct C++ 11
    By coffee_cup in forum C++ Programming
    Replies: 6
    Last Post: 11-03-2013, 10:40 PM
  2. 2D vector struct, 1D pointer?
    By motocross1 in forum C++ Programming
    Replies: 5
    Last Post: 01-27-2012, 02:50 PM
  3. copy string by pointer
    By mohsen in forum C Programming
    Replies: 6
    Last Post: 01-25-2012, 11:59 AM
  4. How to copy value from MySQL result to string pointer?
    By fekkesh in forum C Programming
    Replies: 2
    Last Post: 03-12-2009, 08:52 AM
  5. string vector to string pointer manipulation
    By stanlvw in forum C++ Programming
    Replies: 11
    Last Post: 07-16-2008, 01:43 AM

Tags for this Thread