User Tools

Site Tools


opus:spring2013:mowens3:journal

sysprog Journals

MONTH Day, YEAR

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Yeah me for forgetting the first month

March, 2013

I have been working on the programs to make our pictures we are oging to use for breakout. I am also working on a program using an exec functions on Visual C++ for my CSIT program and made a simple test program on lab46.

1 #include <unistd.h>                                                         
2 #include <stdio.h>
3 
4 int main()
5 {
6     printf("Opening a file in 5 seconds.\n");
7     sleep(5);
8     execl("hellopic", "i");
9     return(0);

10 }

This program worked exactly as expected. Because the program hellopic is in the same folder, I was able to use a relative path instead of the direct path. The program I am working on at home will use a direct path, and hopefully work. The “i” is used as an extra variable for argn and can be NULL instead.

After playing around with the program in Visual Studios I could not get the program to work right away. I spent many hours googling this issue and found no answers. While in class I decided just to try a system function call instead, and it worked perfectly without any issues. So currently the program is working. The next issue to solve is the changing address of the file wanting to be opened from one system to another. The current idea is a text file that is read from while the program is being executed. Shouldn't be too hard, going to ask for Matt's input.

April, 2013

I am re-reading and working on some coding for movement in my head atm. I am also working with my program for CSIT 2310.

The program for CSIT 2310 is going okay. I had to use the system function, system(), to call google chromes.exe. I think I am going to make a text file that will contain the wanted path of the file to open and have the system call just open from a file. Going to try that on lab46 first.

Also worked with a classmates pong game, helped him find and fix an error. The crash is now fixed, was fun debugging and reading his code.

Got the test file working in class on the 12th. Worked perfectly, now I will need to play around with it on visual… hopefully microsoft doesn't throw me any random curve ball.

Got another test file working on the 17th… it's working very well so far… the program's source code is as follows

#include<cstdlib>
#include<cstdio>
#include<unistd.h>
#include<string.h>
 
int main()
{
    char chrome[200];
    char strlength;
    FILE *input;
    input = fopen("input.txt", "r");

    //Getting the string
    fgets(chrome, 200, input);
    strlength = strlen(chrome);
    chrome[strlength -1] = '\0';

    printf("chrome's located at: %s \n", chrome);
    sleep(5);
    execl(chrome,"");
    fclose(input);
    return(0);
}
opus/spring2013/mowens3/journal.txt · Last modified: 2013/04/17 14:34 by mowens3