|
The answer you were given assumes you're using C++/CLI ( as that's where you asked ). If you wan tto use ANSI C++, you need to ask in the visual C++ forum. Or, just use google. There are at least 3 ways for time to be represented in C++, but there are MSDN pages that go over them all.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi all
I am try to use "ScheduleTimer.dll" which is uploaded by "Andy Brummer" article as ".NET Scheduled Timer".
But i am unable to exacute a function at schedule time by using this dll
if anybody have idea about this DLL or another method for executing a method at scheduled time please share with me.
thanks
bankey
|
|
|
|
|
To execute a function at a scheduled time, you just need to set a timer to check the time, and see if the time you are looking for has elapsed. If you're having trouble using the code from an article, the message board on that article is the best place to ask.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I want to run an external executable file, but i'm not sure what the command line is....help?
Woohooo! I'm a tarnard.
|
|
|
|
|
In C++/CLI ( which is where you're asking ), it's process.Start. In normal C++, on windows, it's ShellExecute ( if you wanted that, I suggest asking in the right forum in future ).
It's also clear you want C++ help, you may try making your header more meaningful. Imagine if all these psots said 'help with C++' ???
If you want a standard C++ answer, none exists. ShellExecute assumes you're programmiung for windows and have access to the Windows APIs.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
To add to Christian's reply, you may also use system calls such as system(), _exec() and _spawn(). They are C API, but not Windows specific.
Best,
Jun
|
|
|
|
|
Hi All,
I get the following compilation error:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\cstringt.h(875): error C2664: 'PtrToStringChars' : cannot convert parameter 1 from 'unsigned char *' to 'const System::String __gc *'
The code segemnt is:
#pragma once
#pragma managed
void CDailyRep::OnBnClickedNewreportsOk()
{
/*********************************************************/
CrystalDecisions::CrystalReports::Engine::ReportDocument * crReportDocument = new ReportDocument();
// ReportDocument::FileName = "BATCH.RPT" ;
// ReportDocument::FilePath = "c:\\QpayReports_CR10\\" ;
crReportDocument->Load(L"C:\\QpayReports_CR10\\Batch.RPT",OpenReportMethod::OpenReportByTempCopy);
// crReportDocument->Load(( System::String __gc*)L"c:\\QpayReports_CR10\\BATCH.RPT"); // ,OpenReportMethod::OpenReportByTempCopy);
// crReportDocument->Load("c:\\QpayReports_CR10\\BATCH.RPT"); // ,OpenReportMethod::OpenReportByTempCopy);
// crReportDocument->Load(reportDocument) ;
// char * file1 = "c:\\QpayReports_CR10\\BATCH.RPT";
// wchar_t *file1 = L"c:\\QpayReports_CR10\\BATCH.RPT";
// String* file = System::Runtime::InteropServices::Marshal.PtrToStringAnsi(file1[0]);
// String* file = Marshal::PtrToStringAnsi("c:\\QpayReports_CR10\\BATCH.RPT");
// String* file = Marshal::PtrToStringAnsi(file1);
// String *file = __gc new String(file1); // char *.
// String *file = __gc new String("c:\\QpayReports_CR10\\BATCH.RPT"); // char *.
// String *file = __gc new String("c:\\QpayReports_CR10\\BATCH.RPT"); // char *.
// String *file
// crReportDocument->Load((String *)file);
// crReportDocument->Load(__gc new String("c:\\QpayReports_CR10\\BATCH.RPT"));
// crReportDocument->Load((__wchar_t)L"c:\\QpayReports_CR10\\BATCH.RPT");
My command lin ios :
/G7 /GA /I "C:\TUXEDO\include" /I "C:\Program Files\Common Files\Crystal Decisions\2.5\managed" /AI "C:\Program Files\Common Files\Crystal Decisions\2.5\managed\en" /AI ".\Release" /D "NDEBUG" /D "_DWIN32" /D "WIN32" /D "_WINDOWS" /D "WINNT" /D "_AFXDLL" /D "_MBCS" /FD /MD /GS /J /Zc:wchar_t /Yu"stdafx.h" /Fp".\Release/Qpay.pch" /Fo".\Release/" /Fd".\Release/vc7.0.pbd" /W3 /nologo /c /Zi /clr /TP
No matter what i use, the agrument passed to PtrToStringChars is always an unsigned char *. I am at the end of my wits can any one please help?
Thanks,
Madhu
|
|
|
|
|
PtrToStringAnsi or PtrToStringChars? Where are you calling PtrToStringChars?
Mark
|
|
|
|
|
Mark,
I was able to resolve this issue.
The command line:
crReportDocument->Load(L"C:\\QpayReports_CR10\\Batch.RPT",OpenReportMethod::OpenReportByTempCopy);
The frist argument to Load wascalling thr PtrToStringChars.
Solution:
As with other MS products, Look elsewhere for the error instead of where the compiler complains.
Thx Madhu.
|
|
|
|
|
Cool 
|
|
|
|
|
hi every 1, this is my 1st post and i hope you guys can help me with my problem.
this is my problem .a quistion and i dont know how to solve it:
(Word Processing) One important function in word-processing systems is type justification—the alignment of words to
both the left and right margins of a page. This generates a professional-looking document that gives the appearance of being set in
type rather than prepared on a typewriter. Type justification can be accomplished on computer systems by inserting blank characters
between each of the words in a line so that the rightmost word aligns with the right margin.
Write a program that reads several lines of text and prints this text in type-justified format. Assume that the text is to be
printed on 8-1/2-inch-wide paper, and that one-inch margins are to be allowed on both the left and right sides of the printed page.
Assume that the computer prints 10 characters to the horizontal inch. Therefore, your program should print 6 1/2 inches of text, or
65 characters per line.
|
|
|
|
|
Here are the core problems with your question
1 - it's obviously your homework
2 - it obviously requires you to do this manually, which would not happen in the real world. If we told you the APIs for text justification, your teacher would fail you
3 - if your teacher saw this post, and a reply with code, he would fail you
4 - if someone were stupid enough to sit down and do your homework for you, when your teacher realises you have no idea how the code works, he would fail you
5 - if we did your homework for you, you wouldn't learn anything, and you'd have to ask us again. Eventually, we'd all get sick of doing your homework ( assuming that your teacher didn't spot in class that you have no idea about any of the work ), and he would fail you
6 - the odds are low that your course is being taught in C++/CLI, so the odds are low that you were even able to find the right forum.
Do your own homework. Ask specific qustions if, after trying to do your own homework, you get stuck. The question explains how to do it. All it doesn't say, is what language you are using ( which, I guess you know, although I'll be floored if it's C++/CLI ).
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thx for your reply ;
first, im not a collage or privat school student "cant afford it".am self eductated student.
second,when i need help where can i go? i need some support from you.
3rd,now it is my fault that i didnt ask the right quition.
4th,yes i have an overview of the solution but still need support.
the quistion is are you welling to help?
thx for understanding
|
|
|
|
|
core99 wrote: am self eductated student.
OK, so you're working through a book, and it doesn't have the answers in it ? I'd abandon the book for another one.
core99 wrote: the quistion is are you welling to help?
Really, what you're wanting help with is of no value, you can get any text to justify just by callnig the right API. If you're looking for learning exercises, I'd choose them from a book that gives you the answers, if you don't have a teacher to check your work.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thats great Graus, its a good reply. But shall I say you one thing, Americans dont use better English than British. May be, I am wrong in your openion, but they some times use wrong grammer than Indians too. Dont mind this is just my friendly reply. Thank you.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
indian143 wrote: Americans dont use better English than British
I'm neither, but I agree, the reverse is true. Where did this come from ?
indian143 wrote: but they some times use wrong grammer than Indians too
Perhaps rarely. It's more often that Indian grammar and spelling is the worst. But, it's to be expected, as English is not their (your) first language.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Do you know a normal Indian can speak atleast 3- languages. My few Saudi(I was working there) friends got stunned when I said this. India has 30+ scripted languages and 2000+ unscripted languages. Ok. Thank you. Sorry for the inconvenience.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
I guess there's some irony in the fact that (as far as I know) until now, no american has
posted in this thread.
Mark
|
|
|
|
|
I am afraid that I cannot speak or write well enough to reply! However, it is apparent our Indian friends do not realize that there are several dialects of English. The correctness of one dialect over another is only determined by political and economic factors.
Geo.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
whats the point!
guys, is this your way of helping new members?
yall left the main point!
the main point from this post is to help,ok.
please do not post if you not willing to help
that is unmature..
|
|
|
|
|
You need to ask questions that will elicite the answers you seek. If you have a specific question on a very specific issue, we can help. We are not here to read your mind or do your Google searches for you. Sounds like you need paid professional help!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
this is my work:
#include<iostream>
#include<fstream>
#include<cstring>
using namespace std;
int main()
{
ifstream fin("data.txt",ios::in);
if(!fin)
{
cerr<<"could not open the file\n";
exit(1);
}
int nward=0;
int length[nward];
char word[nward];
while(fin>>word[nword])
nword++;
if(nward==60)
length[nword]=strlen(word[nward]);
while(!eof)
{
int done=0;
int wordcount=0;
int counter=0;
while(!done)
{
counter+=length[nward];
wordcount++;
if(counter==60)
{
counter-=length[nward]-1;
done=1;
}
still i need to work on this code "you can see that";
and its not complete i hope you guys can direct me,comment and help any way you like; 
|
|
|
|
|
Many people come here looking for answers but don't know how to ask a question to elicit the desired response. If you are one of those people, please read: http://catb.org/~esr/faqs/smart-questions.html[^]
This does not apply 100% to this forum but there are some good points that can be applied here.
-- modified at 21:45 Friday 5th January, 2007
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Good link!
One thing I can't figure out... i get the "I know I'm just a pathetic newbie loser, but..." but
are "hackers" good or bad?
Mark
|
|
|
|
|
Since I am an old fart, I can remember when a hacker was a "good" guy. The definition of hacker has shifted a lot over the years unfortunately. The link below is about how the meaning of hacker has changed: http://en.wikipedia.org/wiki/Hacker_definition_controversy[^]
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|