Skip to content

How to match string values from two string vectors within a nested loop

Notifications You must be signed in to change notification settings

davecanderson/stackoverflow_20138787

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stackoverflow_20138787

https://stackoverflow.com/questions/20138787

How to match string values from two string vectors within a nested loop

Trying to find the indexes for certain header values in a CSV file to use them to extract the data in those positions in the rest of the file.

The problem was with the input for the header line. This contained a line break at the end which wasn't matching the items in the array. Removing the line break fixed the problem.

I was working on a Windows PC and then transferring the file to a Cent OS machine for running the code and the difference in the line endings between the two platforms is what caused the issue.

Using this as a debug statement cout << cell would show the string and ignore the line break. Using something like cout << cell << " CELL" didn't show the string because of the line break.

About

How to match string values from two string vectors within a nested loop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages