CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2000
    Location
    IL, U.S.A.
    Posts
    218

    input sequential file

    I have this input sequential file. The number 8 is used to make buttons for each Question. I can't figure out how to input the answers into a array and compare them to the answer in the text box. The code I have so far just enters the questions into the label.

    Data-types Quiz, 8
    1, What data-type would you use for the population of Chicago?, LONG,LONG,lng,1
    2, What data-type would you use for a Social Security number?, STRING,STRING,str,1
    3, What data-type would you use for a variable where the only valid values are ON/OFF?, BOOLEAN,BOOLEAN,bln,1




    Open g_strFileName for input as #intFileNum

    input #intFileNum, strTestName, intNumberOfQuestions ', strAnswere1, strAnswere2, strAnswere3
    'input #intFileNum, strAnswere1, strAnswere2, strAnswere3

    me.Caption = strName & "'s " & strTestName

    ReDim g_strQuestionsAndAnswers(1 to 7, 1 to intNumberOfQuestions) as string

    for intLoadQuestions = 1 to intNumberOfQuestions
    Call MakeTheButtons(intLoadQuestions)
    for intLoadFields = 1 to 6
    input #intFileNum, g_strQuestionsAndAnswers(intLoadFields, intLoadQuestions)
    next intLoadFields
    g_strQuestionsAndAnswers(intLoadFields, intLoadQuestions) = "<Enter you answer>"
    next intLoadQuestions

    Close #intFileNum







  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: input sequential file

    Look at my reply in

    http://www.codeguru.com/cgi-bin/bbs/...age=0&Limit=25

    It might help you.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured