Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8850687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:57:35+00:00 2026-06-14T12:57:35+00:00

I currently have a .csv file containing three fields: user, password, type. For instance,

  • 0

I currently have a .csv file containing three fields: user, password, type. For instance, my file looks like this:

michael, sun123, user  
joseph, sierra7, user  
isaac, apple2, sysop 

I would like to read from such file and check if the user “isaac” is present in the list. So far, I was able to open the file and put every characters of my file into a 1D array called database[]. I have set a pointer pointing to the very first character of my database[] array. My question is: How do I manage to find “isaac” in the file?

My idea was to check if the first character of the user I am looking for matches a character in my array. If so, I begin to check the next characters as long as I don’t hit a comma. When I hit a comma, I then check if there exits a password, a comma and a type before a carriage return using boolean. Is there an easier way of doing this?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:57:36+00:00Added an answer on June 14, 2026 at 12:57 pm

    You can use the result of strstr(database, "isaac"); to find “isaac” in your database[].

    You can use strtok (or it’s safe variants, detailed here http://msdn.microsoft.com/en-us/library/ftsafwz3(v=vs.80).aspx) to break your database[] up into more manageable items (ie. tokenize on commas and newlines) for your parsing needs.

    A combination of strtok and strstr or strcmp may be what you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a CSV file that looks like this: 12345, Here is some
I have a csv file that looks like this NumberofNullAsOfDates 0 I would like
Currently, I have a CSV file set out like this: Element,Weight Hydrogen,1 Oxygen,16 Eventually
I currently have a csv file that I'm parsing with an example from here:
I'm currently just starting my first Lua program and I have a .csv file
Currently have password protection on my main and sub directories, however I'd like to
I have a CSV file uploaded to the same directory as the file containing
I have a simple JSP to download a csv file containing Japanese characters. Downloaded
I currently have a CSV that I have built using StringBuilder in C#. This
I currently have a .csv file with several unlabeled columns of data, which to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.