Search:

Type: Posts; User: sharonch

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,166

    weird problem, compiler problem?

    The following is a extremely easy c++ program, but the output is incorrect. Please help:
    =============================output=====================
    ??22
    pt2[0]: g str[21]: g
    pt2[1]: n ...
  2. C programming in Mac. stderr and stdout redirection

    The following code doesn't give me any problem in Linux. But it is not that case when I run it in Mac OS 10.8.

    I am wondering if I have done something wring about redirect the stderr and...
  3. Replies
    5
    Views
    1,178

    I know what is wrong. It is in the Makefile. ...

    I know what is wrong. It is in the Makefile.
    I run


    vncstudent: vncstudent.c pprint.c
    gcc -o vncstudent vncstudent.c pprint.c -I.


    The program run. Is it the linkage issue for...
  4. Replies
    5
    Views
    1,178

    I did! I place extern char HDIR[20]; char...

    I did!
    I place

    extern char HDIR[20];
    char HDIR[20];

    to vncstudent.h
    and now it is not complain about HDIR.

    But did I do anything wrong with pprint()?
  5. Replies
    5
    Views
    1,178

    I didn't paste the header file which is where I...

    I didn't paste the header file which is where I place those library, but I still have question:


    #include "vncstudent.h"
    #include <unistd.h>
    #include <string.h>


    int main()
    {
  6. Replies
    5
    Views
    1,178

    external variable

    #include "vncstudent.h"
    #include "pprint.c"
    char HOMEDIR[20];


    int main()
    {
    extern char HOMEDIR[];
    padd();
    pprint();
  7. Replies
    0
    Views
    1,354

    write to a pipe and so on

    I want to rewrite a code to windows
    In Unix setting, I use a FILE pointer and open the pipe to run the forced command. It is like the following:


    #define cmd
    "ssh -i /home/keys/student...
  8. Replies
    7
    Views
    1,321

    Yes! It is working. Thanks a lot. I want to...

    Yes! It is working. Thanks a lot. I want to check if I am right: the WinAPI that correspond to system() is WinExec(). But it didn't work in my program. I include <Windows.h> and <WinBase.h>,...
  9. Replies
    7
    Views
    1,321

    Hmmm, I tried, it didn't work. I still think the...

    Hmmm, I tried, it didn't work. I still think the problem is in the "space" instead of "\".
    system("xcopy password.ini C:\Program Files\OpenSLP /i /y");
    Because it treats the C:\Program Files as...
  10. Replies
    7
    Views
    1,321

    Do you have any good suggestion of using \?

    Do you have any good suggestion of using \?
  11. Replies
    7
    Views
    1,321

    writing a c code in VC++ for windows

    This is a very simple question, but it is just hard for me to figure out. I try to move a file from my folder to a program files subfolder, but I think the cmd in windows take the space between...
  12. Wow! Thank you all. They are all constructive...

    Wow! Thank you all. They are all constructive to my code! Thanks.
  13. how to save my current working directory into a variable

    I was thinking to have my program print its directory to a file and then
    system("cd") >> "ok.txt";

    read from "ok.txt" to retrieve the current working directory, but it is a bit complicated.
    ...
  14. IDE or compilier to develop c program in windows

    Hi,
    I have a question about developing a c program. I wrote my program in linux machine using emacs. Now, I have to make it works on windows machine(xp). I know I probably can rewrite the whole...
  15. Replies
    1
    Views
    1,422

    What to do if I don't know the program

    I really not sure if I can post this here, but I need some help!

    I am using tomcat7 on Ubuntu VM. I wrote a Perl CGI to receive users' input and pass those input to my c program in the server. ...
  16. Replies
    23
    Views
    3,160

    Thanks for all the meaningful replies. I solved...

    Thanks for all the meaningful replies. I solved all of the problems that I have asked earlier. I would like to recap what happen:
    1. correct warning. Since a lot of warning I have are not as...
  17. Replies
    23
    Views
    3,160

    Yes, I am trying to copy the entire public key...

    Yes, I am trying to copy the entire public key into the variable "content". and paste the "line" in the beginning of the new public key then append the content after "line". now, it is working with...
  18. Replies
    23
    Views
    3,160

    Please allow me to answer my own question. After...

    Please allow me to answer my own question. After testing things for times. I figure that the fopen didn't go to the directory that I am working with to open that particular file. That is why it is...
  19. Replies
    23
    Views
    3,160

    It compiled. Your statement is not true.

    It compiled. Your statement is not true.
  20. Replies
    23
    Views
    3,160

    I think I have correct the warning. No...

    I think I have correct the warning. No segmentation faults, but now the "line" and "content" is not writing to where it suppose to.


    #include <stdio.h>

    int main()
    {
    getKey();
    return0;...
  21. Replies
    23
    Views
    3,160

    I can see why you say that for the line 27 and...

    I can see why you say that for the line 27 and 28, but I think it is the only way for me to paste those info into a file.
    although the % is going to messup my program, I went into the lastfirst.pub...
  22. Replies
    23
    Views
    3,160

    Something weird happened. I am running this code...

    Something weird happened. I am running this code from a different directory and it is giving me segmentation fault again. Is it mean that I can't change directory in the system()?



    #include...
  23. Replies
    23
    Views
    3,160

    Yes, system is working. Thank Salem.

    Yes, system is working. Thank Salem.
  24. Replies
    23
    Views
    3,160

    Ok, I see the problem. It is a logic issue. ...

    Ok,
    I see the problem. It is a logic issue. The public key is not generated until the program finish. Therefore, it can't read or write while the file is not ready yet.
  25. Replies
    23
    Views
    3,160

    To encourage a positive discussion, I want to...

    To encourage a positive discussion, I want to clean up my code a bit. I think the major issue is in fget() and I don't know what is wrong.


    int main()
    {
    getKey();
    return 0;
    }
Results 1 to 25 of 26
Page 1 of 2 1 2