hi all, i use vex sop add a string attribute(neighbourpoints) to default grid, but the result isnt expected, every point attribute have a number 10, like that,
any help?
thanks,
sop
vopsop1()
{
int count = getneighbourcount(ptnum, 0);
string temp = “”;
int test=0;
int i;
for(i=0; i < count; i +=1 )
{
int neighptnum = getneighbour(ptnum, i, 0);
temp+=sprintf(“%d ”,neighptnum);
test+=neighptnum;
}
printf(“%s ”,test);
addattribute(“neighbourpoints”, temp);
}
the “test” variable export is right:
11 13 16 19 22 25 28 31 34 27 31 44 48 …
About use sprintf vex function converts a int to a string.
8497 0 0- onlyoneHai
- Member
- 17 posts
- Joined: July 2007
- Offline
-
- Quick Links