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

Search:

Type: Posts; User: Philip Nicoletti

Page 1 of 5 1 2 3 4

Search: Search took 0.17 seconds.

  1. Re: copy constructor issues with vector class

    The problem can be seen with a simpler code snippet:



    A a1;
    A a2(a1);


    And your copy constructor:
  2. Re: CFileDialog mulitple selection limit - is there a workaround ?

    Why use GetOpenFileName instead of CFileDialog ? It had the same restriction that
    CFileDialog had. BUt as has been mentioned, that restriction no longer exists. Example:



    CFileDialog...
  3. Re: CFileDialog mulitple selection limit - is there a workaround ?

    Where do you set: fileDlg.GetOFN().lpstrFile and fileDlg.GetOFN().nMaxFile ?
  4. Re: Extracting time stamps from pdf

    Can you run the following console code and see if the results
    are what you expect ? Change the name of the input file
    and check the results.txt file when done.



    #include <fstream>
    #include...
  5. Re: Extracting time stamps from pdf

    ToFind.Format("when");


    I don't have access to VS compiler right now ... but would
    that compile if using a UNICODE build ?
  6. Re: Extracting time stamps from pdf

    Some things to consider:

    1) I do not think that CString::Find() will work if their are embedded NULLS in the
    string before the time stamp.

    2) one "line" could contain multiple time stamps
  7. Re: Extracting time stamps from pdf

    I don't use CStdioFile, but in general, if you open a file up
    in text mode and read while looping, you can come across
    EOF early. Try opening in binary mode.
  8. Re: problems on resize an array:(

    You are not casting the return value from malloc to the correct type:



    a.Images.Image1.Stop.SubImages=(struct Images *)malloc(1 * sizeof(struct Images));
  9. Replies
    3
    Views
    228

    Re: [RESOLVED] Trees (Maps) problem

    There are a few issues with your code:

    1) Although this does not affect your program, you
    should not put "using namespaec std;" in your
    header file. It can cause name clash problems.
    ...
  10. Replies
    2
    Views
    196

    Re: my build .exe files stopped

    As Victor mentioned, debugging yoiur code would lead to the answer quickly.

    Some notes:

    1) checking eof() in the loop as you coded it, leads to the loop body
    being accessed one more time than...
  11. Re: Can't read in a text file to load a struc

    You might need to post your current code for reading the file.

    Did you change the first get() to getline() in the loop ? If so, you
    should remove the first get() in your loop (since getline...
  12. Re: Can't read in a text file to load a struc

    You have ...



    inFile >> howmany;

    // ...

    inFile.get(ps[count].fullname, strsize);
  13. Re: Can't intialize C++ Struct with CString in it??

    I'm not sure where the error message is coming form, but there are
    a couple of errors in your posted code.



    struct print form [] =
    {
    { 30, 40, 1,data("test"), "N/A" }, // what is...
  14. Re: Writing and Reading Binary data in FORTRAN and C++

    You did not show the code where you convert the data read to a double.

    I imagine it would look like this:



    // after the read file ...
    const int nDoubles = dwRead / sizeof(double);

    for...
  15. Re: have en error: expression must have integral or enumtype

    The variables : "i" and "n" should be of integral type (such as int), not double.
  16. Replies
    3
    Views
    354

    Re: Problem Reading File in C++

    Could you explain what you are btrying to do ?

    There are a number of problems:



    int poundpos[12];

    // ...
  17. Replies
    2
    Views
    268

    Re: A question regarding stl set

    Because foo() could (potentially) modify the parameter that is passed.

    So ... foo(*it) , could modify an element in the set (which is not allowed,
    since it could mess up the ordering).
  18. Re: How to make a random array to not repeat?

    You can use random_shuffle ...



    #include <algorithm>

    // after entering the data ...

    random_shuffle(g,g+4);
    random_shuffle(b,b+4);
  19. Re: Quick question on const char[] to wstring

    Load(L"Data\\Mesh.x");


    Also, if you do not change filename, you should pass by const reference, not by value.
  20. Re: noob Dev-C++ help. Need to calc area & perimeter of a rectangle (class proj).

    The problem with tabs is that you don't necessarily know how many to use.
    setw() provides a little better control. The caveat with setw() is that it specifies
    the minimum number of characters for...
  21. Re: How to set a starting root directory for this code that selects a folder name?

    1) Does that compile ? The third parameter to _tcscpy is not an LPARAM. I should probably be:


    _tcscpy_s(szDir,MAX_PATH,reinterpret_cast<LPCTSTR>(pData));


    2) I don't think you need to use...
  22. Re: How to set a starting root directory for this code that selects a folder name?

    Right now you have:


    bi.lpfn = NULL;


    Change it to something like:


    bi.lpfn = BrowseCallbackProc;
  23. Re: I need very fast help, like within the hour, please!

    Basically, you ignored what I said. To get a particular column, you do not need
    to loop on j.

    j = 0 ... gives the first column
    j = 1 ... gives the second column

    etc.
  24. Re: I need very fast help, like within the hour, please!

    The third column corresponds to j = 2

    so there is no need to a a for loop with j in your code to print out the 3rd column.
  25. Replies
    2
    Views
    220

    Re: R Code Programming

    Also note: R has an extensive built in help facility that is started by typing
    in a question mark followed by the command. Examples:

    ?read.table

    ?dnorm

    That, along with google, should get...
Results 1 to 25 of 120
Page 1 of 5 1 2 3 4



HTML5 Development Center

Click Here to Expand Forum to Full Width