Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Astricks

@Astricks
About
Posts
61
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Book for SQL 2005 [modified]
    A Astricks

    Thanks :)

    *

    The Lounge

  • Book for SQL 2005 [modified]
    A Astricks

    Thanks :)

    *

    The Lounge

  • Book for SQL 2005 [modified]
    A Astricks

    Thanks :)

    *

    The Lounge

  • Book for SQL 2005 [modified]
    A Astricks

    Can you suggest a good book for SQL SERVER 2005? -- modified at 8:14 Wednesday 14th March, 2007:sigh:

    *

    The Lounge

  • What the next?
    A Astricks

    I guess it's Rain.

    *

    The Lounge

  • Now, how to delete?
    A Astricks

    I voted you up, but it greyed :confused:

    *

    C / C++ / MFC question com tools help tutorial

  • Now, how to delete?
    A Astricks

    Thanks toxcct :D

    *

    C / C++ / MFC question com tools help tutorial

  • Now, how to delete?
    A Astricks

    Thanks. I'm handling struct objects inside vectors for the first time. So the panic.

    *

    C / C++ / MFC question com tools help tutorial

  • Now, how to delete?
    A Astricks

    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 ]

    *

    C / C++ / MFC question com tools help tutorial

  • Query text vs SP
    A Astricks

    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.

    *

    Database sharepoint database visual-studio tutorial question

  • Find Algorithm [STL]
    A Astricks

    OMG! That's it. I've missed it !:doh: I've commented the line for no reason X| . Thanks a lot prasad_som. :jig:

    *

    C / C++ / MFC question c++ graphics algorithms json

  • Find Algorithm [STL]
    A Astricks

    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:|

    *

    C / C++ / MFC question c++ graphics algorithms json

  • Find Algorithm [STL]
    A Astricks

    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;

    *

    C / C++ / MFC question c++ graphics algorithms json

  • Find Algorithm [STL]
    A Astricks

    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.. }*/

    *

    C / C++ / MFC question c++ graphics algorithms json

  • Find Algorithm [STL]
    A Astricks

    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 :~

    *

    C / C++ / MFC question c++ graphics algorithms json

  • Calling SP from .net
    A Astricks

    Thanks, I'll try that.

    *

    C# database csharp sharepoint help question

  • Calling an SP with Param...
    A Astricks

    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.

    *

    Database database csharp sharepoint help question

  • Calling SP from .net
    A Astricks

    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.

    *

    C# database csharp sharepoint help question

  • GET_X_LPARAM
    A Astricks

    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.

    *

    C / C++ / MFC help question

  • What's wrong.... [modified]
    A Astricks

    Thanks :(

    *

    C / C++ / MFC help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups