Click here to Skip to main content
14,580,589 members

C / C++ / MFC

 
GeneralRe: I am creating a program with Visual Basic Script files with C++. Pin
c0d3r1/226-Jun-20 9:41
Memberc0d3r1/226-Jun-20 9:41 
GeneralRe: I am creating a program with Visual Basic Script files with C++. Pin
Victor Nijegorodov26-Jun-20 10:01
MemberVictor Nijegorodov26-Jun-20 10:01 
GeneralRe: I am creating a program with Visual Basic Script files with C++. Pin
Victor Nijegorodov26-Jun-20 20:40
MemberVictor Nijegorodov26-Jun-20 20:40 
AnswerRe: I am creating a program with Visual Basic Script files with C++. Pin
Dave Kreskowiak26-Jun-20 9:16
mveDave Kreskowiak26-Jun-20 9:16 
QuestionDebug assertion failed in occcont.cpp file Pin
Member 1464252324-Jun-20 21:24
MemberMember 1464252324-Jun-20 21:24 
AnswerRe: Debug assertion failed in occcont.cpp file Pin
Victor Nijegorodov24-Jun-20 22:27
MemberVictor Nijegorodov24-Jun-20 22:27 
AnswerRe: Debug assertion failed in occcont.cpp file Pin
Richard MacCutchan24-Jun-20 22:30
mveRichard MacCutchan24-Jun-20 22:30 
QuestionCreate a timer Pin
Member 1486543216-Jun-20 23:00
MemberMember 1486543216-Jun-20 23:00 
Good Morning everybody.

I'm developing a program in C++.

It is supposed that the program has to read from excel and write the data in a .txt file. It has to do that during 10 minutes, and after that save the .txt and start doing it again.

How can I do the timer?

May you help me please?

The program I write is this one: (Not sure if is correct)

#include 
#include 
#include 
#include 
#include 
#include 

using namespace std;
struct vehiculo
{
    char VIN[8]
    char hora[19]
};
int main()
vehiculo cocheentrante
{
    File *F;
    File *G;

    //Abrir archivo de Excel

    F = fopen("C:\Users\Ford\Usuarios\Cristales\VINES.csv", "rt");

    if (F == NULL)
    {
        cout << "No se pudo abrir el archivo de entrada. \n";
    }
    else
    {
        cout << "El archivo se abrio correctamente. \n";
    }

    //Crear archivo txt

    G = fopen("dd_mm_aaaa__hh_mm_ss.txt","w");

    if((G = fopen("dd_mm_aaaa__hh_mm_ss.txt","w"))!= NULL)
    {

    //Leer archivo de excel

        while(!feof(F))
        {
            fgets(VIN,8,F);
            fgets(hora,19,F);
            fprintf(G, "%s %s", &VIN, &hora);
        }
    }
    fclose(G);
    fclose(F);
}


modified 17-Jun-20 5:31am.

AnswerRe: Create a timer Pin
Richard MacCutchan16-Jun-20 23:33
mveRichard MacCutchan16-Jun-20 23:33 
SuggestionRe: Create a timer Pin
David Crow18-Jun-20 5:25
MemberDavid Crow18-Jun-20 5:25 
QuestionHandling large numbers Pin
Member 1484924616-Jun-20 22:18
MemberMember 1484924616-Jun-20 22:18 
AnswerRe: Handling large numbers Pin
OriginalGriff16-Jun-20 22:19
mveOriginalGriff16-Jun-20 22:19 
AnswerRe: Handling large numbers Pin
CPallini17-Jun-20 4:16
mveCPallini17-Jun-20 4:16 
GeneralRe: Handling large numbers Pin
David Crow18-Jun-20 5:30
MemberDavid Crow18-Jun-20 5:30 
GeneralRe: Handling large numbers Pin
Peter_in_278018-Jun-20 12:48
professionalPeter_in_278018-Jun-20 12:48 
QuestionHelp me - C++ Pin
Coder1122334416-Jun-20 4:05
MemberCoder1122334416-Jun-20 4:05 
AnswerRe: Help me - C++ Pin
CPallini16-Jun-20 4:47
mveCPallini16-Jun-20 4:47 
AnswerRe: Help me - C++ Pin
Richard MacCutchan16-Jun-20 5:05
mveRichard MacCutchan16-Jun-20 5:05 
AnswerRe: Help me - C++ Pin
ZurdoDev16-Jun-20 5:26
mveZurdoDev16-Jun-20 5:26 
GeneralRe: Help me - C++ Pin
Member 798912216-Jun-20 5:49
MemberMember 798912216-Jun-20 5:49 
AnswerRe: Help me - C++ Pin
Member 798912216-Jun-20 5:36
MemberMember 798912216-Jun-20 5:36 
GeneralRe: Help me - C++ Pin
Richard MacCutchan16-Jun-20 6:06
mveRichard MacCutchan16-Jun-20 6:06 
QuestionVisual Studio and Windows SDKs - need some experienced comments about SDK usage and RTLs Pin
charlieg11-Jun-20 12:44
Membercharlieg11-Jun-20 12:44 
AnswerRe: Visual Studio and Windows SDKs - need some experienced comments about SDK usage and RTLs Pin
Richard MacCutchan11-Jun-20 21:32
mveRichard MacCutchan11-Jun-20 21:32 
AnswerRe: Visual Studio and Windows SDKs - need some experienced comments about SDK usage and RTLs Pin
Mircea Neacsu12-Jun-20 2:24
MemberMircea Neacsu12-Jun-20 2:24 

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.