Search:

Type: Posts; User: tommy69

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Actually I didnt know that. That's why I...

    Actually I didnt know that. That's why I couldn't figure it out. Thanks for telling me this. I was probably taught it, but it either slipped my mind or I wasn't paying attention in class. The for...
  2. I forgot to put text instead of fileName....Now...

    I forgot to put text instead of fileName....Now when I replaced it with text, then it seemed to work fine. I have a small problem with option 8 again. It's printing option1 like 7 times before...
  3. When I tried to use this in my program, my code...

    When I tried to use this in my program, my code wouldn't work. I changed buf to text and fp to fname. For example, this part of code doesnt work:


    system ("cls");

    char text[80];
    char...
  4. Thanks for your help. I think I finally have...

    Thanks for your help. I think I finally have this huge program completed. Huge in my standards. I really appreciate your time and patience and this also goes to everyone else who helped me.
  5. Can anyone tell me why I am getting a number that...

    Can anyone tell me why I am getting a number that is always 1 higher than the number of times an option was selected? For example, If I selected option4 (5) times, it would display the number 6.
    ...
  6. I created a better way to encrypt and decrypt...

    I created a better way to encrypt and decrypt files. I don't know why I didnt think of this earlier. Let me know what you think:


    void encrypt(FILE *fname)
    {

    FILE*encrypt;

    char...
  7. I figured this code out before you sent that...

    I figured this code out before you sent that Quazah. There are probably a lot of things wrong with the code or there are a lot of things that could be done to improve the code. For some reason, my...
  8. I tried to try it, but when I go to open the file...

    I tried to try it, but when I go to open the file that I just created, it's empty. I'm trying to rename the file that I just opened and changed to lowercase.
  9. I am still getting an empty file name. Here's the...

    I am still getting an empty file name. Here's the function again:


    void lower(FILE *fname)
    {
    FILE *lower;


    char text[81];
    char fileName[13];
  10. while(!feof(fname))...Take this code out then

    while(!feof(fname))...Take this code out then
  11. I am opening a file first, then converting to...

    I am opening a file first, then converting to lowercase.
    After converting the file to lowercase, I need to write the lowercase text to a new file. So wouldn't I use the "w" to write?
  12. The new file that I named is created with the...

    The new file that I named is created with the correct name that I chose, but when I open the file, it's empty. Not sure why.



    void lower(FILE *fname)
    {
    FILE *lower;

    char text[81];...
  13. Thanks Rouss. I almost completed option 3. I...

    Thanks Rouss. I almost completed option 3. I converted the text file to lowercase. However, I now need to write the lowercase text to a new file and allow the user to name the output file. I used...
  14. Ok...I created a file using option1 and I named...

    Ok...I created a file using option1 and I named it hello.txt. I then went to Option2 and typed hello.txt and it opened the file and displayed it on screen. This is what it's supposed to do. ...
  15. Well what I did was create the file using...

    Well what I did was create the file using Option1. then I chose Option2 and tried to open the file created with Option1 and for some reason it's not opening. I'll check again.
  16. Why can't I print the file that I name onto the...

    Why can't I print the file that I name onto the screen? Is the printf statement wrong? It's supposed to read the contents of the file, up to the 81 characters specified in the text array. I am...
  17. Function prototype is void character(FILE*); ...

    Function prototype is void character(FILE*);

    When option 2 is selected:


    void character(FILE *fname)
    {
    char text[81];
    char fileName[13];
  18. I kind of understand what you are saying. But I...

    I kind of understand what you are saying. But I didn't think it would be a good idea to do this because this program is NOT using the same file each and every time. For example, option2, the one I...
  19. I am trying to display the text of the file by...

    I am trying to display the text of the file by using:


    while (fgets(text,81,fname) !=NULL)
    printf("%s", text);

    Since I'm not returning anything from the function, can I just use...
  20. For my function prototype, I have...

    For my function prototype, I have FILE*character(FILE*)

    The switch statement for case 2:
    text=character(text);
    break;

    Function:
    ...
  21. quzah, I am not asking him to do my complete...

    quzah,
    I am not asking him to do my complete homework. I only wrote down what I am supposed to do so there wont be any miscommunication when I ask him a question. So for your information, I have...
  22. To make thing easier, I will write what I have to...

    To make thing easier, I will write what I have to do for all 8 options. Just so you know and maybe you'll be able to understand a little better.

    Option 1:
    1.)Reuqest the name of the file....
  23. I was working on my other class assignments. I...

    I was working on my other class assignments. I just wanted to make one thing clear. My teacher said that I wont neccesarily be using the same file every time. I will be requesting A file, but not...
  24. One other thing I forgot to mention. Each option...

    One other thing I forgot to mention. Each option except for option #8, I need to request the file. So for Option #2, after I request the file, it says display the input text. Since I am displaying...
  25. ok...that'll work. I removed the FLUSH from this...

    ok...that'll work. I removed the FLUSH from this statement because once I created the file and named it and I was done writing to it, I had to hit enter twice to get back to the main menu. With...
Results 1 to 25 of 78
Page 1 of 4 1 2 3 4