Search:

Type: Posts; User: bluemimmosa

Search: Search took 0.00 seconds.

  1. Well i removed the scanf too. and used the fgets...

    Well i removed the scanf too. and used the fgets as read on the link you sent..



    #include <stdio.h>
    #include <conio.h>
    #include <string.h>

    #define XOR ^
    #define DIV_BY_2(x) (x>>1)
  2. Well thanks for the buffer overflow protecting...

    Well thanks for the buffer overflow protecting mechanisam, i can do it later on..
    i have fixed some pointers thing temporarily holing the start address.. and restoring them,,,. in some functions.....
  3. Is it necessary to empty the buffer that we...

    Is it necessary to empty the buffer that we allocated with malloc or it is not necessary... ?
  4. Well i got rid of gets() and then i changed the...

    Well i got rid of gets() and then i changed the encdec funtion to simple as well as used the i value on src to pick different bytes.. and i also updated the buffer2 pointer to point to last byte......
  5. Yeah finally solved all problems, but the result...

    Yeah finally solved all problems, but the result is not as i expected..
    Can some one help me what is wrong..
    I just wanted to encrypt the file using the passwords truncated 1 byte adler32 hash..
    ...
  6. Yeh got it finally to work with , thanks for...

    Yeh got it finally to work with , thanks for that..
  7. Here it is.. #include #include...

    Here it is..



    #include <stdio.h>
    #include <conio.h>
    #include <string.h>
    #include <fcntl.h>
    #include <io.h>
  8. Why cant i get the file length of a binary file....

    Why cant i get the file length of a binary file.
    i tired this also, but it returns 0.



    length = lseek(file1, 0, SEEK_END);
  9. for(length = 0; fread(&temp, sizeof(char), 1,...

    for(length = 0; fread(&temp, sizeof(char), 1, filehandle) != EOF; len++);


    So, i did this itertion till EOF and i think it should return length in length.
    but it not working..
  10. NO not yet!! its already 2:09 AM and my eyes are...

    NO not yet!! its already 2:09 AM and my eyes are not helping me, i will come tomorrow after trying. time for some good sleep now. GOOD NIGHT.
  11. @jim is there a EOF character on the end of...

    @jim is there a EOF character on the end of binary file, no not possible, to my knowledge i dont see that there are any marks or signs of file ending in binary files. The ends are calculated as per...
  12. yes that menas if setjmp(buf) returns 0, then the...

    yes that menas if setjmp(buf) returns 0, then the if block will execute, saying this the setjmp() must be a function returning some kind of integer value..
  13. Yes like matticus said, i tried printing len and...

    Yes like matticus said, i tried printing len and it returned to be -1. so that means i am not getting the file size correctly.
    So how can i get file size correctly... and pls take note that i am...
  14. @jim, i cant use any other compile bcoz its for...

    @jim, i cant use any other compile bcoz its for my college project and i cant use other compilers that 16 bit turbo c compiler. I think malloc shouldnt fail on small files but is failing so to my...
  15. Null pointer asignement in turbo C on DOSBOX

    The code is as follows.


    struct encrypt
    {
    unsigned int signature;
    unsigned long hash;
    unsigned start_offset;
    unsigned long long length;
    } encfile;
  16. Replies
    1
    Views
    790

    check this while loop...

    i have a while loop and is confusing; can someone help me to understand it.



    void *v3; // esp@1
    int v5; // [sp+14h] @1
    int v6; // [sp+18h] [bp-10h]@1
    int v7; // [sp+1Ch] [bp-Ch]@1
    ...
  17. thank you sganesh for helping me out.. now i...

    thank you sganesh for helping me out..
    now i need to extend this program with more fields and encryption decryption process so no one can look in the plain text data files...
  18. got it working the mistake is,, ...

    got it working the mistake is,,



    remove("EMP,DAT");
    rename("TEMP.DAT","EMP.DAT");


    see the code there is a , inplace of .
  19. ok i found checking the file emp.dat and...

    ok i found checking the file emp.dat and temp.dat.

    my problem is that the emp.dat could not be deleted and temp could not be renamed..
  20. i am using turbo c++ 3.0 and what my problem...

    i am using turbo c++ 3.0

    and what my problem is i input the name to delete but the name is still there after deletion too. dont know what is wrong.
    ok make 3 records and try to delete one of...
  21. Already did like this

    while(fread(&e,recsize,1,fp)==1)
    {
    if(strcmp(empname,e.name)!=0)
    {
    fwrite(&e,recsize,1,ft);
    }
    }
  22. Every thing works fine as expected but delete a record does'nt pleease help me..

    here is the code..


    #include<stdio.h>
    #include<conio.h>
    #include<stdlib.h>
    #include<string.h>
    void main()
    {
    FILE *fp,*ft;
Results 1 to 22 of 22