Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Philip Nicoletti

Page 1 of 80 1 2 3 4

Search: Search took 0.24 seconds.

  1. Replies
    27
    Views
    1,663

    Re: Encrypt/Decrypt Problem

    You did not make the changes that I posted earlier. Make those changes and re-run.



    It is returning the entire string, but you are not printing it. You are using printf() to print the string....
  2. Replies
    27
    Views
    1,663

    Re: Encrypt/Decrypt Problem

    Here is the result that I get with the input that you said doesn't work:



    Input password: The Input pasword is meera@saraswathi@3c@
    The key is 123455
    The encrpted pasword is αkφ≈┬ !↕Ω║...
  3. Replies
    27
    Views
    1,663

    Re: Encrypt/Decrypt Problem

    At the very least:

    1) pass the length of the string to be decrypted to DecryptString:



    BOOL CCryptString::DecryptString(TCHAR* szEncryptPwd,TCHAR* szPassword,TCHAR *szKey , DWORD length_in)
  4. Replies
    27
    Views
    1,663

    Re: Encrypt/Decrypt Problem

    What type of debugging have you tried ?

    After the call:


    oCrypt.EncryptString(szPassword,szEncryptPwd,szKey);

    szEncryptPwd[16] = 0 (NULL)

    The function: DecryptString() has code that...
  5. Re: Problem to read value from a file in visual studio 2015 C++

    I'm not exactly sure what you want. maybe an example would help. column oriented input is a bit tricky. In many cases it would be easier to read the entire line into a string and parse the string. ...
  6. Re: Problem to read value from a file in visual studio 2015 C++

    maybe something like this:



    while (getline(totot,name,':')) // read everything up to an including the first ':' into name
    {
    double x;
    totot >> x;
    ...
  7. Re: C++ Class member function Bug Can't see it

    1) what is the purpose of the "mn = buf;" line

    2) Does the code that calls this function expect buf to be NULL terminated ?
    I don't see any guarantee that buf is NULL terminated

    3) This looks...
  8. Re: Stringstream error: out of range in memory

    Do you have blank lines in the files ? If so, you will get an out-of-range error on the "at(0)" calls.

    I would change:



    while(ss)
    {
    ss >> holder;
    if (holder.at(0) == 'X')
  9. Re: Little/Big Endian test code in machine and file

    CFD codes write out in binary, since writing "text"s would be considerably slower and increase the size of data written. They usually take care of it one of two ways:

    1) similar to "netcdf...
  10. Replies
    8
    Views
    597

    Re: c++ stl map

    You have:



    //.cpp
    std::map<u8, u8> m_mlistOfCliConfiguredPolicyRules = boost::assign::map_list_of(Apn_Fred, 9);


    I am guessing it should be:
  11. Replies
    8
    Views
    597

    Re: c++ stl map

    boost::assign::map_list_of("PolicyRule_Fred", PolicyRuleInfo( BearerQoSInfo(9), TFTInfo()))

    //

    listOfPolicyRuleInfo::iterator it = m_mlistOfCliConfiguredPolicyRules.find("PolicyRule _Fred");
    ...
  12. Re: Using upper_bound() and lower_bound() (from the 'algorithm' header)

    It depends on how the iterators are used. For example, if the vector is not sorted, it is possible that
    the upper_bound iterator could end up "before" the lower bound iterator. Look at what would...
  13. Re: Using upper_bound() and lower_bound() (from the 'algorithm' header)

    1) is the vector sorted ?

    2) How are you using the returned iterators ? It should be something like:



    for (auto it=it_lower; it!=it_upper; ++it)
    {
    // use it
    }
  14. Re: Problem with empty/null string/char...

    Just a note: many c-functions that take a char * have undefined behavior if you send a null. Example:



    char * p =0;
    int n = strlen(p);
  15. Replies
    6
    Views
    465

    Re: Nested containers ...again :(

    It might be clearer removing the range based for loop:



    for(auto it=n_tuple.begin(); it!=n_tuple.end(); ++it)
    {
    auto pt = *it; // this copies the vector *it into the...
  16. Replies
    6
    Views
    465

    Re: Nested containers ...again :(

    I didn't really understand your question, but ...



    std::set< std::vector<int> > n_tuple = unique_n_combinations (seq, n) ;
    for(auto pt : n_tuple) // so pt is of type vector<int>
    ...
  17. Re: What is the common technique of using pointers to change some value on the fly?

    yes.

    If you have the second edition of "The Standard C++ Library" by Josuttis, this is explained in section 15.11.3 (Input/Output using auxiliary functions).

    It is also explained in the first...
  18. Replies
    15
    Views
    929

    Re: Calculate error Pi value ------

    Your code is difficult to follow/modify with the use of all the "magic numbers". That is, what if you want to use 20000 rectangles instead of 10000, you would need to change the code in multiple...
  19. Replies
    15
    Views
    929

    Re: Calculate error Pi value ------

    The height is supposed to be calculated at the mid-point of the rectangle. It looks like you are calculating it a the left vertex.
    Maybe you should initialize x as:


    x = 0.5 / 10000.0;
  20. Replies
    15
    Views
    929

    Re: Calculate error Pi value ------

    why is "sum" declared as an int variable ?
  21. Replies
    7
    Views
    523

    Re: accessing nested elements...

    For readability, I sometimes do the following:


    // given :

    set<vector<int>> s;
  22. Re: Creating a text file for randomly generated numbers

    No. You only need to do that because you are specifying fstream::in (why are you doing that ??)
    Since you are using fstream:app, every time you run the program, data will be appended to the
    file if...
  23. Re: Creating a text file for randomly generated numbers

    You have:



    ofstream random_numbers("D:/StudentData/Documents/DataStructures/SortingAlgorithms/randIntContainer.txt");


    That creates/opens the file.

    Then in main(), you try to open it...
  24. Replies
    8
    Views
    605

    Re: Freeglut in VS2010

    A long time ago I used glut with Mui (a micro user interface that came with glut).

    I just gave values to those variables. Something like:



    int argc = 1;
    char * argv[] = { "your_exe_name"...
  25. Re: compile with terminal from MyProject folder

    It depends on where you execute the executable from (and maybe even if you execute from an IDE or not).

    If you execute from the terminal in the MyProject folder it would probably be:


    ...
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!


HTML5 Development Center