t to do something like
void f1(int a[][])
{//do smth
}
//and call the function like this
F1({{1,0},{2,5}});
Use std::initializer_list<>
http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=424
#include <initializer_list>
template< typename T > void foo( std::initializer_list< std::initializer_list<T> > a )
{
// ...
}
int main()
{
foo( { { 1, 2, 3 }, { 4, 5, 6 } } ) ;
}
Your link suggests otherwise, but I was under the impression that your syntax is only valid in C++0x?
Initializer lists are part of standard C++, since August 2011 (when C++11 was formally accepted by a unanimous 21-0 vote). It was not there in the old standard (C++98 which has now been superseded).
thx for responses guys, but never mind it, i'll try to find an easier solution, because it seems that the chip i am trying to program doesn't support advance C++, not ever libraries, just native C and the predefined functions used to manipulate the circuit
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.