F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_34767538_21474.cpp: In function 'std::string sformat(const string&, Args ...)':
0_0_34767538_21474.cpp:11:172: error: 'make_unique' was not declared in this scope
 template <typename... Args> string sformat(const string& format, Args... args) { size_t size = snprintf(nullptr, 0, format.c_str(), args...) + 1; unique_ptr<char[]> buf = make_unique<char[]>(size); snprintf(buf.get(), size, format.c_str(), args...); return string(buf.get(), buf.get() + size - 1); }
                                                                                                                                                                            ^
0_0_34767538_21474.cpp:11:184: error: expected primary-expression before 'char'
 template <typename... Args> string sformat(const string& format, Args... args) { size_t size = snprintf(nullptr, 0, format.c_str(), args...) + 1; unique_ptr<char[]> buf = make_unique<char[]>(size); snprintf(buf.get(), size, format.c_str(), args...); return string(buf.get(), buf.get() + size - 1); }
                                                                                                                                                                                        ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 11:01:48, Gzip enabled