catchorg / textflowcpp Goto Github PK
View Code? Open in Web Editor NEWA simple, single-header-only library, for wrapping text. In C++
License: Boost Software License 1.0
A simple, single-header-only library, for wrapping text. In C++
License: Boost Software License 1.0
std::copy( col.begin(), col.end(), std::back_inserter( lines ) ); failed to compile (line 160 and 165 in TextFlow_test.cpp) int function to_vector.
FAILED: CMakeFiles/TextFlow.dir/TextFlow_Tests.cpp.o
/usr/bin/x86_64-linux-gnu-g++-7 -O3 -DNDEBUG -std=gnu++1z -MD -MT CMakeFiles/TextFlow.dir/TextFlow_Tests.cpp.o -MF CMakeFiles/TextFlow.dir/TextFlow_Tests.cpp.o.d -o CMakeFiles/TextFlow.dir/TextFlow_Tests.cpp.o -c /home/antoine/NetBeansProjects/c++/TextFlow/textflowcpp/TextFlow_Tests.cpp
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /home/antoine/NetBeansProjects/c++/TextFlow/textflowcpp/TextFlow.hpp:14,
from /home/antoine/NetBeansProjects/c++/TextFlow/textflowcpp/TextFlow_Tests.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h: In instantiation of ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = TextFlow::Column::iterator; _OI = std::back_insert_iterator<std::vector<std::__cxx11::basic_string > >]’:
/usr/include/c++/7/bits/stl_algobase.h:422:45: required from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = TextFlow::Column::iterator; _OI = std::back_insert_iterator<std::vector<std::__cxx11::basic_string > >]’
/usr/include/c++/7/bits/stl_algobase.h:455:8: required from ‘_OI std::copy(_II, _II, _OI) [with _II = TextFlow::Column::iterator; _OI = std::back_insert_iterator<std::vector<std::__cxx11::basic_string > >]’
/home/antoine/NetBeansProjects/c++/TextFlow/textflowcpp/TextFlow_Tests.cpp:160:68: required from here
/usr/include/c++/7/bits/stl_algobase.h:377:57: error: no type named ‘value_type’ in ‘struct std::iterator_traitsTextFlow::Column::iterator’
typedef typename iterator_traits<_II>::value_type _ValueTypeI;
^~~~~~~~~~~
/usr/include/c++/7/bits/stl_algobase.h:379:64: error: no type named ‘iterator_category’ in ‘struct std::iterator_traitsTextFlow::Column::iterator’
typedef typename iterator_traits<_II>::iterator_category _Category;
^~~~~~~~~
/usr/include/c++/7/bits/stl_algobase.h:383:9: error: no type named ‘value_type’ in ‘struct std::iterator_traitsTextFlow::Column::iterator’
const bool __simple = (__is_trivial(_ValueTypeI)
~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __is_pointer<_II>::__value
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __is_pointer<_OI>::__value
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& __are_same<_ValueTypeI, _ValueTypeO>::__value);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/stl_algobase.h:386:44: error: no type named ‘iterator_category’ in ‘struct std::iterator_traitsTextFlow::Column::iterator’
return std::__copy_move<_IsMove, __simple,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_Category>::__copy_m(__first, __last, __result);
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
I replace line 160 with:
for ( auto&& line : col )
lines.push_back( line );
and line 165 with
for ( auto&& col : cols )
lines.push_back( col );
now compile and test PASSED
could you please give me more explanation how to wrap my text file with this c++ program
I downloaded the source code run cmake . then visual solution created , I build and run the solution everything ok but where do i put my text that i want to wrap ?
I apreciate your help;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.