Thread: Help assigning memory to structure arrays

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Have you considered the use of std::vector?

    You do not need to use the typedef as you did since this is C++.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #2
    Registered User
    Join Date
    Nov 2010
    Posts
    15
    I couldn't get vectors to work. I was running into following messages which I didn't understand. If someone can provide the syntax, I am more than willing to switch to vectors

    LINK : test.dll not found or not built by the last incremental link; performing full link
    mysolver.def : warning LNK4102: export of deleting destructor 'public: virtual void * __ptr64 __cdecl std::bad_alloc::`scalar deleting destructor'(unsigned int)
    __ptr64'; image may not run correctly
    mysolver.def : warning LNK4102: export of deleting destructor 'public: virtual void * __ptr64 __cdecl std::length_error::`scalar deleting destructor'(unsigned i
    nt) __ptr64'; image may not run correctly
    mysolver.def : warning LNK4102: export of deleting destructor 'public: virtual void * __ptr64 __cdecl std::logic_error::`scalar deleting destructor'(unsigned in
    t) __ptr64'; image may not run correctly
    Creating library test.lib and object test.exp

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Structure of arrays
    By zeebo17 in forum C Programming
    Replies: 2
    Last Post: 06-23-2010, 10:11 AM
  2. Bug in Best-Fit Memory Allocation program (Simulation)
    By RommelTJ in forum C Programming
    Replies: 6
    Last Post: 12-13-2009, 04:43 PM
  3. Assignment Operator, Memory and Scope
    By SevenThunders in forum C++ Programming
    Replies: 47
    Last Post: 03-31-2008, 06:22 AM
  4. Zeroing out member arrays in a Structure
    By manofsteel972 in forum C++ Programming
    Replies: 4
    Last Post: 03-26-2004, 03:50 AM
  5. Assigning memory address of member struct to pointer.
    By Tronic in forum C++ Programming
    Replies: 2
    Last Post: 03-20-2004, 05:53 PM