Thread: assign string to the string variable inside structure!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15
    Registered User
    Join Date
    Oct 2012
    Posts
    34
    Quote Originally Posted by manasij7479 View Post
    #include<memory>
    i do that before posting...
    i am using codeblock v10.05
    Code:
    #include <iostream>
    #include<memory>
    using namespace std;
    struct a{
     string test;
    };
    int  main()
    {
    unique_ptr<a> b( new a() );
    }
    error: 'unique_ptr' was not declared in this scope|
    error: expected primary-expression before '>' token|
    error: 'b' was not declared in this scope|
    Last edited by king_zart; 12-09-2012 at 04:14 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. string inside of a structure?
    By dyelax in forum C++ Programming
    Replies: 8
    Last Post: 06-17-2010, 07:09 PM
  2. assign value to string
    By rahulsk1947 in forum C Programming
    Replies: 3
    Last Post: 04-06-2006, 03:40 AM
  3. Assign string to variable?
    By 98dodgeneondohc in forum C Programming
    Replies: 8
    Last Post: 04-24-2005, 01:51 PM
  4. Replies: 12
    Last Post: 10-14-2003, 10:17 AM
  5. Replies: 4
    Last Post: 01-22-2002, 11:13 PM