Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3021

How can insert value in structure vector?

$
0
0
Here I have given my sample code, but it gave error. How can insert value in structure vector?

Code:

struct Hough_Transform_3D_Accumulator
{
        long int i;
        long int j;
        long int k;
        long int count;
};

int main()
{
........................

for(i=0;i<total_r_count;i++)//for loop r count start
{
for(j=0;j<total_theta_count;j++)//for loop theta count start
{
for(k=0;k<total_shi_count;k++)//for loop shi count start
{
if(accumulator_3D[i][j][k]>0)
{
vec.push_back(i,j,k,accumulator_3D[i][j][k]);/// error message
}
}
}
}

Error Message:error C2661: 'std::vector<_Ty>::push_back' : no overloaded function takes 4 arguments

Viewing all articles
Browse latest Browse all 3021

Trending Articles