Thanks :)
*
Thanks :)
*
Thanks :)
*
Thanks :)
*
Can you suggest a good book for SQL SERVER 2005? -- modified at 8:14 Wednesday 14th March, 2007:sigh:
*
I guess it's Rain.
*
I voted you up, but it greyed :confused:
*
Thanks toxcct :D
*
Thanks. I'm handling struct objects inside vectors for the first time. So the panic.
*
Please Refer Here[^] This doesn't work there:
if (mySObj_iter != lst_mySObj.end())
{
lst_mySObj.erase(*mySObj_iter);
}
How do I do it?Overload any other operator?:confused: Error: error C2664: 'std::list<_Ty>::_Iterator<_Secure_validation> std::list<_Ty>::erase(std::list<_Ty>::_Iterator<_Secure_validation>)' : cannot convert parameter 1 from 'myStruct' to 'std::list<_Ty>::_Iterator<_Secure_validation>' with [ _Ty=myStruct_t, _Secure_validation=true ]
*
When should I go for query & when should I prefer SP? For example, we can wrap a simple select query inside an SP . Is it a better way? Any technical advanatages by using a particular method? I'm asking just for optimizing my app.
*
OMG! That's it. I've missed it !:doh: I've commented the line for no reason X| . Thanks a lot prasad_som. :jig:
*
I changed it to reference type, but still doesn't work :( I tried to print them :
for (mySObj_iter=lst_mySObj.begin(); mySObj_iter != lst_mySObj.end(); mySObj_iter++)
{
printf("\n%d",(*mySObj_iter).x);
}
Even this doesn't work:|
*
Yes:
typedef struct myStruct
{
int x;
int y;
bool operator == (const myStruct rhs)
{
printf("\n%d,%d-%d,%d",rhs.x,rhs.y,x,y);
return ((x==rhs.x) && (y== rhs.y));
}
}myStruct_t;
*
Nice, it compiles now. Thanks. Now, the "find" doesn't work ! anyway thanks I've moved a step up. :)list <myStruct_t> lst_mySObj; for(int i=1;i<=20;i++) { myStruct_t mySObj; mySObj.x =i; mySObj.y=i; } myStruct_t mySObjFind; mySObjFind.x =5; mySObjFind.y=5; list::iterator mySObj_iter; ; ; mySObj_iter = find(lst_mySObj.begin(), lst_mySObj.end(),mySObjFind ); ; // printf("\nHere%d",(*mySObj_iter).x);//iCrash! ; ; /*if (mySObj_iter != lst_mySObj.end()) { printf("\nHere%d",(*mySObj_iter).x); Never enters here.. }*/
*
Please consider this example:
#include <vector>
#include <list>
#include <algorithm>
using namespace std;
...
list <int> nums;
list <int> ::iterator nums_iter;
nums.push_back (3);
nums.push_back (7);
nums.push_front (10);
nums_iter = find(nums.begin(), nums.end(), 3); // Search the list.
if (nums_iter != nums.end())
{
cout << "Number " << (*nums_iter) << " found." << endl; // 3
}
else
{
cout << "Number not found." << endl;
} Here the elements are of type "int". So we can directly make a "find". But what if the pushed elements are objects? or struct variables? for example:typedef struct myStruct { int x; int y; }myStruct_t myStruct_t mySObj; mySObj.x=10;mySObj.y=20; list <myStruct_t> lst_mySObj; //Push a lot of mySobj into lst_mySObj list. list <myStruct_t>::iterator mySObj_iter;
How do I do the rest of the rest of the things? Like this :??? mySObj_iter = find(lst_mySObj.begin(), lst_mySObj.end(),mySObj.x ); Not sure :~
*
Thanks, I'll try that.
*
Calling by the other way: Is it possible to call a stored procedure WITH PARAM from .net WITHOUT using "AddParams" ? I mean we should be able to call(exec) the SP just like we do in the query analyser. I'd construct the string like "sp_testproc '111','RR',23'". and execute it as nonQuery. Is there any way? please help.
*
Calling by the other way: Is it possible to call a stored procedure WITH PARAM from .net WITHOUT using "AddParams" ? I mean we should be able to call(exec) the SP just like we do in the query analyser. I'd construct the string like "sp_testproc '111','RR',23'". and execute it as nonQuery. Is there any way? please help.
*
Why do I get "undeclared identifier" error when I try to use "GET_X_LPARAM" Macro? :~ . In the requirement(MSDN), they have specified : Header Declared in Winuser.h, include Windows.h Minimum operating systems Windows 95, Windows NT 3.1
I have XP.
*
Thanks :(
*