|
If you link against static version of the MFC class library then you don't have to distribute the library itself.
To Link against static version of the MFC:
(1) Choose the Settings item of the Project menu.
(2) Select Use MFC in a Static Library item of the combo box below the Microsoft Foundation Classes label.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
my code
<br />
<br />
class A<br />
{<br />
public:<br />
int i;<br />
<br />
};<br />
<br />
class B<br />
{<br />
public:<br />
A m_A;<br />
<br />
void f(A a);<br />
};<br />
<br />
void B::f(A a)<br />
{<br />
m_A = a;<br />
return;<br />
}<br />
<br />
<br />
main()<br />
{<br />
B b;<br />
A a;<br />
<br />
b.f(a);
<br />
<br />
}<br />
<br />
|
|
|
|
|
It works fine, at least on my system...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
because my class A not have a default copy constructor
|
|
|
|
|
Sorry you didn't got it.
Hi,
This is because you have enabled RUN TIME check for uninitialised variables /RTCu.
In your code just put the following
int i;
int j = i;
You will get the same runtime error as before as you used variable "i" uninitialised.
Or disable RTC in your project setting.
Default copy constructor means by default it has it. You write a simple constructor (not copy contructor) you won't get this error.
Ultimately this error is caused because of the uninitialised member of class A and you have enabled RTC.
Best Regards
Raj
|
|
|
|
|
|
VC++ 6.0 class view pane not displays all classes in the project.
biju mathew
kattappana
|
|
|
|
|
bijumon Mathew wrote: VC++ 6.0 class view pane not displays all classes in the project.
Try this:
Close the IDE and delete the file which has an extensio of .ncb and re open the project. You should have all your classes displayed.
Hope this helps.
---
Hakuna-Matata
It means no worries for the rest of your days...
It's our problem free, Philosophy
"I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."
|
|
|
|
|
Hi all
I have CString type Buffer ,fname Now i want to copy the contant
of buffer in to fname
Note : One think more impportant i am saving the file in to local HD using
this
fileObj.Open("c:\\UserFolder\\" + fname + ".txt",CFile::modeCreate,NULL);
I want to save file with the fname and also copy the contant of buffer to fname
Can any one told me how can i do this.
Regard's
Kaushik
|
|
|
|
|
See
CFile::Write<code>.<br />
<br />
<br />
<div class="ForumSig"><div style="padding: 0; margin: 0; background-color: rgba(170, 214, 255, 1); text-align: center; font-family: Arial; font-weight: bold; font-style: italic; font-size: 9pt"><br />
<div style="color: rgba(255, 255, 255, 1); width: 300px"><br />
<hr width="250" size="7">WhiteSky<hr width="220" size="7"></div></div></div>
|
|
|
|
|
sir
I am already using CStdioFile and using this, i am trying to
copy it but become fail.
can u give some hint for this
Regard's
Kaushik
|
|
|
|
|
|
sir ji
i can create file with file name using this code
fileObj.Open("c:\\UserFolder\\" + fname + ".txt",CFile::modeCreate,NULL);
but i am writing the below code for reading data from buffer and write these contant in to new file. But its not work properly....
fileObj.Open(str,CFile::modeCreate|CFile::modeWrite);
strLine.Empty();
while(fileObj.WriteString("strLine,buffer"))
{
fileObj.WriteString(strLine);
fname += strLine + "\r\n";
}
fileObj.Close();
MessageBox(fname);
Regard's
Kaushik
|
|
|
|
|
Your code has problem
Y_Kaushik wrote: while(fileObj.WriteString("strLine,buffer"))
I think its
while(fileObj.ReadString(strLine));
Now where do you want to write did you create a new file
|
|
|
|
|
sir
i am using
while(fileObj.ReadString(strLine));
and i have already created file with fname .
problem is that writing data upon new file .
Regard's
Kaushik
|
|
|
|
|
On your code you open fileObj for write and also on the loop you want to read of it?
|
|
|
|
|
if we using below code
filewrite.Open(str,CFile::modeCreate | CFile::modeRead);
strLine.Empty();
while(filewrite.ReadString(strLine))
{
filewrite.WriteString(strLine);
fname += strLine + "\r\n";
}
filewrite.Close();
MessageBox(fname);
There is again same problem
Regard's
Kaushik
|
|
|
|
|
You read and write to same file instead you said I read of a file and write to other file did you check your code?
while(filewrite.ReadString(strLine))
filewrite.WriteString(strLine);
|
|
|
|
|
Y_Kaushik wrote: while(fileObj.WriteString("strLine,buffer"))
What is this line doing? WriteString doesn't return a value.
What exactly isn't working properly? What is the format of the data in your buffer?
Mark
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
Hi all
i have developed an MFC application using VS 6.0
The problem is, the .exe is working fine on a system and its not stable on other system(its crashing).
On both of the system VS 6.0 is not installed. I copied the required MFC dlls manually to the WINNT/System32. There may be memory leaks in my application, but the systems are of same configuration ( 1 GB RAM, P4 3.2 GHZ CPU...), I should get the same results on both of the machines. Please suggest, where it might go wrong?
Thank you.
Ramana.
|
|
|
|
|
Did you get any errors? can you more explain about your program?
|
|
|
|
|
The application is a Client, When i perform any operation on Server, the changes should reflect at the Client. I used WinSock 2.2 version for implementation. The server is same, in both the cases. When i run the Server and Client on Machine1 everything is fine. But, when i run the Client Program Macihne2, Client program is crashing. A message is shown saying "The application requested the runtime to terminate".
|
|
|
|
|
does anyone know how to send email with attachment using c code?
|
|
|
|
|
|
Thank you verymuch. i need it for c programming not vc++.
|
|
|
|