|
-
May 2nd, 2003, 02:15 AM
#1
assert function?
my question is about the assert() with
the following code:
#include "stdafx.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <conio.h>
#include <set>
#include <assert.h>
typedef set<int> intSet;
int main(int argc, char* argv[])
{
intSet::_Pairib pib;
for (int i=0;i<1000;i++)
//assert( s1.insert(ID("xie",i)).second );
{
pib=s1.insert(ID("xie",i));
assert(pib.second);
}
..................
getch();
return 0;
}
it works OK!
but why i cant used the assert statement?
i think it's equal to the statements in the brace!
Victory
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|