Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Writing Vector object into a .txt file Pin
Member 935023718-Mar-15 22:32
Member 935023718-Mar-15 22:32 
GeneralRe: Writing Vector object into a .txt file Pin
Jochen Arndt18-Mar-15 22:44
professionalJochen Arndt18-Mar-15 22:44 
GeneralRe: Writing Vector object into a .txt file Pin
Member 935023719-Mar-15 22:27
Member 935023719-Mar-15 22:27 
GeneralRe: Writing Vector object into a .txt file Pin
Jochen Arndt19-Mar-15 22:29
professionalJochen Arndt19-Mar-15 22:29 
GeneralRe: Writing Vector object into a .txt file Pin
Member 935023723-Mar-15 5:12
Member 935023723-Mar-15 5:12 
GeneralRe: Writing Vector object into a .txt file Pin
Jochen Arndt23-Mar-15 5:57
professionalJochen Arndt23-Mar-15 5:57 
GeneralRe: Writing Vector object into a .txt file Pin
Member 935023723-Mar-15 6:20
Member 935023723-Mar-15 6:20 
GeneralRe: Writing Vector object into a .txt file Pin
Jochen Arndt23-Mar-15 6:44
professionalJochen Arndt23-Mar-15 6:44 
As far as I understood you have a haptic device which is some kind of hardware which generates data at a frequency defined by the hardware. If the library does not provide functions to set the sample rate, it is probably fixed. The thread is then activated when new data are available.

But again, without knowing the hardware and the library (which acesses the hardware specific driver), it is rather impossible to answer.

Do you want to write the data to a file with 100 Hz. This is probably too fast (especially when the file must be opened for each write). It again depends on your requirements (who is reading the file). If the data should be read by another process, you may use some kind of IPC (Inter Process Communication).

Regarding timers:
Windows has no high resolution timers. While it is possible to measure times with high resolution (QueryPerformanceCounter), the system timers have a resolution of about 10 ms by default and can be tweaked down to 1 ms.
GeneralRe: Writing Vector object into a .txt file Pin
Richard Andrew x6423-Mar-15 8:39
professionalRichard Andrew x6423-Mar-15 8:39 
GeneralRe: Writing Vector object into a .txt file Pin
Jochen Arndt23-Mar-15 21:53
professionalJochen Arndt23-Mar-15 21:53 
GeneralRe: Writing Vector object into a .txt file Pin
Member 935023723-Mar-15 23:47
Member 935023723-Mar-15 23:47 
GeneralRe: Writing Vector object into a .txt file Pin
Jochen Arndt24-Mar-15 0:17
professionalJochen Arndt24-Mar-15 0:17 
GeneralRe: Writing Vector object into a .txt file Pin
Member 935023725-Mar-15 4:25
Member 935023725-Mar-15 4:25 
GeneralRe: Writing Vector object into a .txt file Pin
Jochen Arndt25-Mar-15 4:46
professionalJochen Arndt25-Mar-15 4:46 
GeneralMessage Closed Pin
25-Mar-15 6:47
Member 935023725-Mar-15 6:47 
GeneralRe: Writing Vector object into a .txt file Pin
Jochen Arndt25-Mar-15 6:56
professionalJochen Arndt25-Mar-15 6:56 
QuestionBIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Tacitonitus16-Mar-15 11:24
Tacitonitus16-Mar-15 11:24 
AnswerRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Frankie-C16-Mar-15 13:00
Frankie-C16-Mar-15 13:00 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Tacitonitus16-Mar-15 15:36
Tacitonitus16-Mar-15 15:36 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Frankie-C16-Mar-15 22:39
Frankie-C16-Mar-15 22:39 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Tacitonitus17-Mar-15 3:34
Tacitonitus17-Mar-15 3:34 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Frankie-C17-Mar-15 4:11
Frankie-C17-Mar-15 4:11 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Tacitonitus17-Mar-15 7:21
Tacitonitus17-Mar-15 7:21 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Frankie-C17-Mar-15 7:29
Frankie-C17-Mar-15 7:29 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Frankie-C17-Mar-15 22:48
Frankie-C17-Mar-15 22:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.