07-23-2011, 05:40 PM
check for empty vector in c++ 2011
Code:
#include <iostream>
#include <vector>
using namespace std;
typedef std::vector<double> Vec;
typedef std::vector<Vec> Mat;
int main(){
Vec v; // this is what i consider to be an "empty" v
if( /*check if v is empty here*/ ) cout<< "v is empty!" <<endl;
return 0;
}0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
