Giter VIP home page Giter VIP logo

stringlistgenerator's Introduction

String List Generator

Program to generate a collection of strings for a Collection Initialization (Vector, List, etc).

How to use

  • Clone the repo.
  • Open and compile Project in your C++ IDE of Choice.
  • Run the Program and insert an input file with space or line break separated strings.
  • Check that if you are on Windows you have activated the Quick Edit Mode in your cmd. To do so right click you're cmd choose Properties > Options > Edit Options.
  • Insert the EOF Signal to the console Windows: Ctrl + Z or Mac: Cmd + D

Examples (List types)

You can input a list of sentences with line breaks.

3D animation
The game has started
Jump over the fence
Runing as fast as the speed of light
Looking into the eyes of the lion

or

You can input a list of space separated words.

Cat Dog Fish Hamster Crocodile

Result

Copy and paste the result to you're app source code and you're ready to keep on you're happy coding streak!

---- DONE READING INPUT FILE ----
"3D animation",
"The game has started",
"Jump over the fence",
"Runing as fast as the speed of light",
"Looking into the eyes of the lion",
---- DONE PRINTING OUTPUT ----
---- DONE READING INPUT FILE ----
"Cat",
"Dog",
"Fish",
"Hamster",
"Crocodile",
---- DONE PRINTING OUTPUT ----

Type of lists

If you wish to switch between the type of input files you are going to read you just need to comment and uncomment the following lines of code.

    // Line break sentence list.
    while(getline(cin, inputString)){
        inputList.push_back(inputString);
    }

    // Space separated word list.
    /*
    while(cin >> inputString){
        inputList.push_back(inputString);
    }
    */

Sorting

If you wish to sort the list before printing it out to initialize you're own collection, you can uncomment the following line in the program and it will sort the list before giving you the output.

// sort(inputList.begin(), inputList.end());

Contributors

If you wish to contribute to the project all ideas and improvements are welcomed, send in a PR and add yourself in the list of Contributors!

stringlistgenerator's People

Contributors

pujolsluis avatar

Watchers

 avatar

Forkers

15831944

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.