|
At a guess it cannot find "XYZ.h". Take a look in your project directory and make sure the file is in the correct place.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
well i have done this once again. The file is in the directory. Is there anything else that I am forgetting?
|
|
|
|
|
Try right-clicking the #include "xyz.h" directive and selecting Open. Does it? From where?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I dont know whats happening. I repeated the same procedure and this time it was OK.
|
|
|
|
|
|
Why do you need to post the same message three times? Post it once and wait; if anyone has the answer they will give it to you, if not you may have to do some research for yourself.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
how can i connect my VC++6 MFC application to sql server? i simply need to know how do i make connection to VC++6 to sql server
plzzzzzzzzzzz help me....
|
|
|
|
|
Why you create multiple thread ??
There are many projects in code project Click here ->[^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
how can i connect my VC++6 MFC application to sql server? i simply need to know how do i make connection to VC++6 to sql server
|
|
|
|
|
Use this
#define CONNECT_STRING _T("DSN=mmmmmmm;UID=sssssss; PWD=gggggg")
m_pDBConn = new CDatabase();
BOOL w_bIsOpen = FALSE;
if(m_pDBConn)
{
try
{
//opens a connection to the data source
w_bIsOpen = m_pDBConn->OpenEx(CONNECT_STRING);
}
|
|
|
|
|
Hi all,
i m reading a text file by using CStdio file,i want when i redaing the file and find the purticular line now i want to update it.
please tell me how can i do this.
thanks in advance.
|
|
|
|
|
Hi,
The only updates you can do on a text (sequential) file is appending or shortening.
So if you want to change something 'inside' you must create a new file and write there [unchanged beginning][changed part][unchanged ending].
Then you can delete the original file and rename the new file with the original name.
cheers,
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
is there no onther option to update file without deleting old file and create new file.
|
|
|
|
|
Hi,
Le@rner wrote: is there no onther option to update file without deleting old file and create new file
There is no other safe option. If you are adventurous you can
1 Shorten to [unchanged beginning]
2 Append[changed part]
3 Append[unchanged ending]
If a power failure (or like problem) occurs during this processing you may have lost [changed part] and [unchanged ending].
cheers,
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
In addition to the previous answer: most of the case, when manipulating files, you read them completely in memory and works directly with the data in memory. When you modify the information and have to save your changes, you recreate the complete file at once.
|
|
|
|
|
Another way to do this would be to memory map the file.
This way you can simply modify the contents and they will be automatically saved to disk by the Lazy Writer component of the Windows kernel.
|
|
|
|
|
«_Superman_» wrote: This way you can simply modify the contents
If your changed part is exactly same size as original (may happen)
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
The size can be controlled by mapping more views and using SetEndOfFile .
Happens.
|
|
|
|
|
Don't you think it's slightly overkill for the OP?
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
You're right.
There are so many crazy ways to do things.
|
|
|
|
|
Hey, I just came across a little problem and wanted to ask for your guys opinion.
What would be the most elegant solution to fix this little issue.
if (GetDriveType(drv) == DRIVE_FIXED)
{
GetDiskFreeSpaceEx(drv,0,&DiskSpace,&FreeDiskSpace);
itoa(GetTickCount()/1000%60,ds,10);
itoa(GetTickCount()/1000%60,fs,10);
string temp = "test " + ds + " dasd" + fs;
}
error C2110: '+' : cannot add two pointers
Open for any suggestions, greetings !
|
|
|
|
|
ALLERSLIT wrote: Open for any suggestions, greetings !
You did not show how ds and fs were declared, but one way might be:
string temp = string("test ") + ds + string(" dasd") + fs;
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Does not work out for me.
Getting theese errors:
Does not work out for me.
\test\main.cpp(18) : error C2784: 'std::_String_iterator<_Elem,_Traits,_Alloc> std::operator +(_String_iterator<_Elem,_Traits,_Alloc>::difference_type,std::_String_iterator<_Elem,_Traits,_Alloc>)' : could not deduce template argument for 'std::_String_iterator<_Elem,_Traits,_Alloc>' from 'char [5]'
1> c:\program files\microsoft visual studio 9.0\vc\include\xstring(440) : see declaration of 'std::operator +'
\test\main.cpp(18) : error C2784: 'std::_String_const_iterator<_Elem,_Traits,_Alloc> std::operator +(_String_const_iterator<_Elem,_Traits,_Alloc>::difference_type,std::_String_const_iterator<_Elem,_Traits,_Alloc>)' : could not deduce template argument for 'std::_String_const_iterator<_Elem,_Traits,_Alloc>' from 'char [5]'
1> c:\program files\microsoft visual studio 9.0\vc\include\xstring(300) : see declaration of 'std::operator +'
\test\main.cpp(18) : error C2784: 'std::reverse_iterator<_RanIt> std::operator +(_Diff,const std::reverse_iterator<_RanIt> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'char [5]'
1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2203) : see declaration of 'std::operator +'
\test\main.cpp(18) : error C2784: 'std::_Revranit<_RanIt,_Base> std::operator +(_Diff,const std::_Revranit<_RanIt,_Base> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'char [5]'
1> c:\program files\microsoft visual studio 9.0\vc\include\xutility(2003) : see declaration of 'std::operator +'
\test\main.cpp(18) : error C2676: binary '+' : 'std::basic_string<_Elem,_Traits,_Ax>' does not define this operator or a conversion to a type acceptable to the predefined operator
|
|
|
|
|
string temp = string("test ") + string(ds) + string(" dasd") + string(fs);
|
|
|
|
|
ostringstream os;
os << "test " << ds << " dasd" << fs;
string temp = os.str()
|
|
|
|