Search:
Type: Posts; User: Philip Nicoletti
Search :
Search took 0.17 seconds.
The problem can be seen with a simpler code snippet:
A a1;
A a2(a1);
And your copy constructor:
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...
Where do you set: fileDlg.GetOFN().lpstrFile and fileDlg.GetOFN().nMaxFile ?
April 26th, 2013 06:04 PM
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...
April 26th, 2013 04:46 PM
ToFind.Format("when");
I don't have access to VS compiler right now ... but would
that compile if using a UNICODE build ?
April 26th, 2013 10:36 AM
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
April 26th, 2013 09:29 AM
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.
April 25th, 2013 11:43 AM
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));
April 23rd, 2013 07:40 AM
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.
...
April 17th, 2013 06:24 AM
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...
April 16th, 2013 06:28 AM
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...
April 15th, 2013 07:53 PM
You have ...
inFile >> howmany;
// ...
inFile.get(ps[count].fullname, strsize);
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...
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...
March 19th, 2013 04:56 PM
The variables : "i" and "n" should be of integral type (such as int), not double.
Could you explain what you are btrying to do ?
There are a number of problems:
int poundpos[12];
// ...
February 20th, 2013 06:54 PM
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).
February 17th, 2013 08:20 AM
You can use random_shuffle ...
#include <algorithm>
// after entering the data ...
random_shuffle(g,g+4);
random_shuffle(b,b+4);
February 5th, 2013 04:54 AM
Load(L"Data\\Mesh.x");
Also, if you do not change filename, you should pass by const reference, not by value.
February 4th, 2013 04:09 PM
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...
January 23rd, 2013 09:26 PM
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...
January 22nd, 2013 06:41 PM
Right now you have:
bi.lpfn = NULL;
Change it to something like:
bi.lpfn = BrowseCallbackProc;
January 16th, 2013 08:11 AM
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.
January 16th, 2013 07:37 AM
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.
January 15th, 2013 06:03 AM
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...
Click Here to Expand Forum to Full Width