|
maybe it is some helpful to you
WM_WTSSESSION_CHANGE
|
|
|
|
|
Through visual studio , I made changes to code and execute.. compiles properly but at execution it gives error
debug assertion failed..
File : wincore.cpp
Line : 875
I try 3-4 or some more times then i can run my program properly.
WHy is this happening just after compile and execute.
pathak
|
|
|
|
|
Through visual studio , I made changes to code and execute.. compiles properly but at execution it gives error
debug assertion failed..
File : wincore.cpp
Line : 875
I try 3-4 or some more times then i can run my program properly.
WHy is this happening just after compile and execute.
pathak
|
|
|
|
|
You have done something wrong with the new code you have changed.
Start your debugger (F5) and check the call stack to see in wich of your function the program crashes.
You don't provide enough information for us to help.
|
|
|
|
|
Man,
I tried to debug.. but at the start point only it halts.
AS you know when you make changes to code and click on execute.. it compiles links and then shown the program in execution. My program compiles , links properly but at execution after compiling gives the assertion error. so i hit 4-5 times execute then it executes without this assertion error.
Is there anything about thread problem. My application shows splash window in the startup on different thread.
regards
Leya
|
|
|
|
|
Sounds like the problem is in the driver hands.sys
|
|
|
|
|
Hello Friends
Help is required from anybody who has done coding for http connectivity using VC++ 6.0 using MFC.
Following is the scenario wherein i am trying to connect the site by authenticating the proxy server.
Following are the steps which i am following, if i am work pls guide me out.
CInternetSession *pSession;
CHttpConnection *pConnection;
CHttpFile *pFile;
CString strObject;
CString szAuthLine;
BOOL bResult;
DWORD dwRet;
pSession= new CInternetSession
(NULL,1,INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);
pConnection=pSession->GetHttpConnection
(_T("http://www.codeproject.com"),1,808,"girish","girish2005");
pFile=pConnection->OpenRequest(NULL,strObject,
NULL,1,NULL,NULL,NULL);
szAuthLine="girish:girish2005";
pFile->AddRequestHeaders(szAuthLine,
HTTP_ADDREQ_FLAG_ADD,strlen(szAuthLine));
bResult=pFile->SendRequest(szAuthLine,NULL,0);
Following mentioned above is the code
pls help me out.
With Rgds
Girish
Software Developer
|
|
|
|
|
I wanted to write this programes result to a file...pls tell me how..
-----------------------------------------------------------------------------
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
void DoStuff()
{
// Get the input from the user.
cout << "Enter digit: ";
string s;
cin >> s;
cout << endl;
for (int i=0; i<10000000; ++i)
{
random_shuffle(s.begin(), s.end());
cout << "Randomised: " << s << endl;
cout << " : " << s << endl;
cout << " : " << s << endl;
cout << " : " << s << endl;
cout << " "<< endl;
cout << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
cout << " "<< endl;
cout << " "<< endl;
cout << " "<< endl;
cout << " "<< endl;
}
}
int main(int argc, char* argv[])
{
DoStuff();
return 0;
}
|
|
|
|
|
Hello.
This seems to be a console app. If it is, them you can just redirect it's output to the file you want.
An example: Suppose your programs name is Program.
Start a command/DOS prompt and go to the directory of the program.
Run your program like this:
Program >outfile.txt
Now you have got a file named outfile.txt
It contains the output of your program.
|
|
|
|
|
Yes, but everything will be redirected to the file. The question for the number of digits also.
|
|
|
|
|
That's right.
I missed that part.
|
|
|
|
|
i ve to include dis in da source code...n i m using visual c++..can u help me..
|
|
|
|
|
In your DoStuff function, open a file stream and output the data the same way you do now (except in the file stream):
ofstream File("MyFile.txt");
File<<Randomised: "<<s<<endl;
Don't forget to include <fstream> at the top of your file (and don't remove the using namespace std line neither).
|
|
|
|
|
i cant get it...can u pls show where to use it..in ma program i sent der..n past it back...
|
|
|
|
|
I just told you: in the DoStuff function. Open this stream at the top of your function and replace all the cout<< by File<<
BTW: when you post code, don't forget to use the code or pre tags just above the emoticons.
|
|
|
|
|
still cant get is dis correct....
<br />
#include <iostream><br />
#include <string><br />
#include <algorithm><br />
using namespace std;<br />
<br />
ofstream File("MyFile.txt");<br />
void DoStuff()<br />
<br />
<br />
{<br />
file << "Enter digit: ";<br />
string s;<br />
cin >> s;<br />
file << endl;<br />
<br />
for (int i=0; i<500; ++i)<br />
{<br />
random_shuffle(s.begin(), s.end());<br />
file << "Randomised: " << s << endl;<br />
file << " : " << s << endl;<br />
file << " : " << s << endl;<br />
file << " : " << s << endl;<br />
file << " "<< endl;<br />
<br />
file << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;<br />
file << " "<< endl;<br />
file << " "<< endl;<br />
file << " "<< endl;<br />
file << " "<< endl;<br />
<br />
<br />
<br />
} <br />
<br />
<br />
}<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
DoStuff();<br />
return 0;<br />
}<br />
|
|
|
|
|
I suggest you read some good book about C++. It seems that you are lacking some of the fundamental syntax. I don't say that to be mean but it is a suggestion.
Now, for the code: when I say in the function that means inside the function, not outside :
void DoStuff()
{
ofstream File("MyFile.txt");
And if you declared the variable as File , use it with the same name (not as file ):
void DoStuff()
{
ofstream File("MyFile.txt");
cout<< "Enter digit: ";
string s;
cin >> s;
cout<< endl;
for (int i=0; i<500; ++i)
{
random_shuffle(s.begin(), s.end());
File<< "Randomised: " << s << endl;
File<< " : " << s << endl;
File<< " : " << s << endl;
File<< " : " << s << endl;
File<< " "<< endl;
File<< "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
File<< " "<< endl;
File<< " "<< endl;
File<< " "<< endl;
File<< " "<< endl;
}
}
And of course, if you replace the firsts cout with File, the question (asking the user to enter the number of digits) will also be redirected to the file. That looks logical no ?
|
|
|
|
|
still gt many error...try to run it in ur machine...
<code><
#include <iostream>
#include <string>
#include <algorithm>
#include<fstream.h>
#include<conio.h>
using namespace std;
void DoStuff()
{
ofstream File("MyFile.txt");
// Get the input from the user.
cout << "Enter digit: ";
string s;
cin >> s;
cout << endl;
for (int i=0; i<500; ++i)
{
random_shuffle(s.begin(), s.end());
file << "Randomised: " << s << endl;
file << " : " << s << endl;
file << " : " << s << endl;
file << " : " << s << endl;
file << " "<< endl;
file << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
file << " "<< endl;
file << " "<< endl;
file << " "<< endl;
file << " "<< endl;
}
}
int main(int argc, char* argv[])
{
DoStuff();
return 0;
}
/code>
|
|
|
|
|
Are you kidding ??
Can't you read what I posted ??? I also posted code. Can't you simply look at it and compare it with your own code ?
Replace file by File (everywhere). C++ is case-sensitive, so that means File and file are two different variables.
|
|
|
|
|
He's not interested in helping himself, so don't bother helping him.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
if u cant help..dun discourage others...this forum is to get help n help others...nt to give useless speech...
|
|
|
|
|
makaveli_07 wrote: this forum is to get help n help others
sure, but you don't have to think that someone will do the whole job for you. you have to work by yourself first, and ask for specific questions when you cannot go further on a point.
here, it's obvious that you don't really understand what you do (first because you don't seem to know C++, and because the VC++ compiler error messages are clear enough to let a beginner understand what he made wrong - still, at the condition that he knows C++).
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
He explained exactly what you had to do. If you had bothered to follow it, you would have got your code working immediately. You posted back more code that didn't work that didn't incorporate any of the changes that he suggested to you. If you ask a question, read the answers.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
thank u brother i got it...
|
|
|
|
|