|
Is your problem solving?
|
|
|
|
|
No
Sameer Thakur
|
|
|
|
|
Why did you see that article not helpful
|
|
|
|
|
Greetings,
I was led to believe that SYSTEMTIME is a UTC time.
Why then when I set my clock to the timezone (Baku GMT +04:00) with dayliight savings on (I have advanced to July 2007 so DST is in effect) i call CTime::GetAsSystemTime() I get the local time in the wHour, wMinute etc... structure members?
SYSTEMTIME myTime;
CTime temp= CTime::GetCurrentTime();
temp.GetAsSystemTime(myTime);
Eventually all i want to do is given the Local Date/Time get the Local Date/Time @GMT Start of Day
e.g. for Local Time 12th July 2007 3:00am (GMT +4:00 DST), the GMT day actually started on 11th July 19.00am (GMT +4:00 DST).
|
|
|
|
|
Sorry regarding the e.g.
e.g. for Local Time 12th July 2007 3:00am (GMT +4:00 DST), the GMT day actually started on 11th July 05.00am (GMT +4:00 DST).
|
|
|
|
|
Hi all,
I'm trying to append data to a file. I have tried the following without success:
HANDLE hFile;
char buffer[BUFSIZE];
DWORD dwBytesWritten;
DWORD nNumberOfBytesToWrite;
BOOL fSuccess;
hFile = CreateFile(TEX("C:\\testing.txt"),
GENERIC_WRITE,
0,
NULL,
OPEN_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL);
sprintf(buffer,"%s",tcpClass.transRequest);
fSuccess = WriteFile(hFile,
buffer,
strlen(buffer)+1,
&dwBytesWritten,
NULL);
The problem is that the data doesn't append to the end of the file.
for example:
example1
example2
example3
...
Can anyone please help me.
Many Thanx
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
Try using the SetFilePosition(...) function to set the "file pointer", which is the location you are reading/writing from, to the end of the file before writing to it.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
dwPtr = SetFilePointer (hFile, lDistance, NULL, FILE_END) ;
Yes, this would work. Would the SetFilePointer() function be used to replace the \r\n ??
Thanx for the response.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
No. The \r\n just indicates (in a MSDOS-style text file) the end of a line. That has nothing to do with where in the file you are currently writing at.
Think of the file like a piece of paper - after getting it, you have to decide where to start writing on it. You can either write on top of other stuff that is already there, or move to the end where there is empty space.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
|
|
Why go to the trouble of using CreateFile directly? Using the standard library it's as simple as this:
#include "stdafx.h"
#include <fstream>
int main()
{
using namespace std;
ofstream of("C:\\Users\\Steve\\out.txt", ios::out | ios::app);
of << "Appended me\n";
return 0;
}
Steve
|
|
|
|
|
That would work, didn't think of that. Thank you very much Steve.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
I have made the new project from the existing one, now when I compiled the project it gives the
link error.
fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
so for
I have set the project property to use precompile header but then it gives the same error for
.pch file.
what should I do to run my application.
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
Clean and rebuild the project.
Regards,
Paresh.
|
|
|
|
|
You are missing one or more required files.
Having an error about a missing PCH file is due to a build issue. Missing an .H file is a missing file.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hi All .
In GPU & CUDA programming : What is difference between shader clock and core clock ?
thanks .
|
|
|
|
|
different parts of the GPU run at different clock speeds.
the core clock controls the basic functions. the memory clock regulates memory access. the shader clock controls the speed of the shading section.
Google should be able to tell you more.
|
|
|
|
|
i want to retrieve my current system time in milli sec
Can anybody tell me how to do it??????
Thanks in advance
|
|
|
|
|
|
Try SYSTEMTIME .
Regards,
Paresh.
|
|
|
|
|
Depends on what you are really asking... What do you mean by "System Time"? Do you mean the current time as far as the system is concerned? Or do you need to know how long the system has been running?
Do you also need millsecond resolution (where you need a feature that has millisecond resolution), or just need the results in milliseconds (where you can simply multiply a seconds value by 1000)?
Either way, a simple search in MSDN will provide useful results.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
thanku my problem got solved
|
|
|
|
|
sulabh_expert@rediffmail.com wrote: my problem got solved
how ?????
you're on a forum, please share the solutions !
|
|
|
|
|
Hi all,
I am starting with a contact manager application. And for this i need to have a double link list to get the data from the csv file.
So that i can add new contact, delete contacts, update contact and save contact.
Is linklist and node class already there in C++.NET
or do i have to create one.
And one more thing i would like to ask is do i have to sort the list before i can read it (using doubly linked list). I mean do i have to write a sort function. Which sort method would be best for this application ?
Thanks a lot
|
|
|
|