Giter VIP home page Giter VIP logo

c-assignment-ascii-merger's Introduction

My solution is based on 3 files, a merge.c which has a header merge.h and
main.c which makes use of the logic in merge.c. I’ve chosen to create my
own struct to avoid a triple pointer and because all parts of the result
is used all all times, also I wanted to be able to use the return value to
give feedback if the function was ran successfully. I chose to parse the
filenames for the parts with a regex, this is because it’s a flexible way
to do it and if I want it to make it work on another format I can just
change the regex. The strings returned is based on a char pointer pointer
which works as a array of strings, I’ve made it so the file read method
reads directly into the char pointer pointer.


When compiled you can print it to stdout using
./merge /path/to/folder
if you want to output it to a file without using piping you can do
./merge /path/to/folder /path/to/output.txt
or if you’re in the same folder just do
./merge folder
./merge folder output.txt


To compile you can use the command gcc -o merge merge.c merge.h main.c

c-assignment-ascii-merger's People

Contributors

sillerud avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.