Reading a File

--Originally published at Future Queen of C++

This was a confusión one, because I had the code really fast, but when I ran it, it gave me extremly big numbers. I asked for Friends for help for about a week, and none of them knew what was the fail. So I asked Ken, and he simply said, it’s because you’re using a .docx, try with .txt, and guess what, it worked just fine…

Files

 


Multipart Data and Files – (WSQ09)

--Originally published at TC1017 (Python3) – Titel der Website

The assignment:

So for this assignment I would like to see you create a function that receives as parameter the name of a file (this would be a string value like data.txt) and your function counts the number of lines and the number of characters in the file which it returns as a single value (but with two values). You will want to look at how to create/define and return a struct value from a function and how to open and read text files line by line

 

My text data:

WSQ09 - txt.data.PNG

My Sourcecode:

WSQ09 - SourceCode.PNG

The result:

WSQ09 - Ergebnis.PNG


Invocando archivos (Data files)

--Originally published at Regular Blog

Concha-Chocolate-color

data

Debo admitir que el segundo parcial fue exhaustivo, pero de alguna manera logré cumplir con las producciones de Catrina y Pedro Infante satisfactoriamente; disfruté de sobremanera los ensayos técnicos-generales y las funciones, las cuales fueron la semana después de parciales.
Me retrasé con la materia de Soluciones de Problemas con Programación, pero ahora me encuentro reivindicándome con TC1017.

Este es el WSQ09, para el cual me inspiré en el código de Alexa Mercado, una colega biomédica y amiga personal.

El objetivo de este código es contar el número de líneas y de caracteres de un texto; para esto es necesario invocar al archivo de cual queremos cuantificar las líneas y caracteres, una vez que se guarda en el código el nombre del archivo, este (el archivo de texto) se puede editar y guardar sin necesidad de editar ni volver a compilar el programa.
Una nueva herramienta que se utiliza para ese código es el string, el cual se utiliza para crear una variable que cuente con más de un caracter.

Ahí está mi código 100% real…
https://github.com/LourdesMnz99/TC1017/blob/master/Multipart%20data%20and%20files

Agradecimiento especial: Alexa Mercado ❤


Multipart Data and Files

--Originally published at Valeria CT

For this WSQ I struggled a bit, though not as much as with WSQ08. To begin with, Ken helped me by explaining wich type of file it should open when I went to visit him in asesorías. Then I just dedicated about two hours during the weekend to writing the program. Inside the same file, I did two options: one that counts just the alphanumeric characters and one that count everything but white spaces. The one that is running is the latter, the other one is put as a comment.

Here’s the link to my code: https://github.com/valeriact/tc1017/blob/master/wsq09.cpp

And the resources that I used:

 

-Valeria


WSQ09

--Originally published at Ernesto's Computing Works

Este programa se llama ” Multipart data and files”, estuvo divertido y nuevo, no sabia que se podían leer archivos en c++ . De eso trataba este programa, para esta tarea en esta ocasión tuve que crear una función que recibiera como un valor string, el nombre de un archivo, con extensión .txt, el punto era tener un archivo con texto en el, ademas esta función debía contar el numero de lineas y el numero de caracteres en el archivo, regresar como respuesta un el valor de cuanto contó.

Este programa también fue nuevo para mi porque yo no sabia como hacer que un archivo de texto fuera leído, ademas que no estaba tan experimentado en variables y valores string, se me hizo un poco difícil así que recurrí a ver vídeos tutoriales al respecto, también hoce un archivo llamado flores.txt en la aplicación atom donde guardo todo los códigos de c++ que hago. También mi profesor Ken me dio recomendaciones para hacer que el programa pudiera leer la cantidad de lineas y caracteres.

Screenshot 2017-10-24 11.22.47

Me apoye en estas paginas web:

-https://www.youtube.com/watch?v=5xEkuvTxQ4Y

-https://www.youtube.com/watch?v=lzxWNtjii8U

-https://www.youtube.com/watch?v=toZYDylpgnw

En este programa se puede abarcar el mastery topic numero #21 en el que como dije anteriormente es algo nuevo para mi , y trata de como hacer un programa en c++ que lea un archivo de texto guardado en la misma dirección en donde esta el programa.


WSQ09 – Char

--Originally published at Solving problems with programming

I´m really excited with this assignment because i learn how to use a char, that in more and explained words it is character.

First I started  with the meanings of char and struct and that´s was all of my day, after that i work in a code for me, only just to understand more how to work with it.

The code i wrote can be find here https://gist.github.com/jesuscmadrigal/e8a9be28848eb642aa526965c0408a41

After I learned about that I started to work with the assignment at first it was confusing but with the time it get more aand more easy to understand.

So you can used my code to understand it even more. https://gist.github.com/jesuscmadrigal/91e7e9abd05792e03aa4cb12a903f17c

Haga click para ver el pase de diapositivas.

 


File Reading

--Originally published at My TC1017 programming class

This program contains information on how to create a programm tha reads a file, and tells you the number of lines and characters in the file.

I wanted to go a little further on the program, so I made it that the user can input the name of the file they want to open.

As always, I will leave the CPP file, and a few refrences.

Google Drive

Refrences: