Search:

Type: Posts; User: dkt

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    2,468

    char[1024] to c++ STL string

    Hi,

    how to convert it?

    char buffer[1024];
    fgets (buffer, sizeof(buffer), fp)
    // convert buffer to c++ STL string
  2. Replies
    1
    Views
    1,509

    how to get the output of a non-stop process?

    i use popen to get the output of this command:
    tail -f /var/log/kern.log

    I use a while loop and fgets (to get the output)
    the process is running and will not stop. other process cannot run and...
  3. Replies
    2
    Views
    1,787

    how to redirect the output of a program?

    I want to execute a program in C. How to get the output of the executed program?

    Thanks.
  4. Replies
    7
    Views
    8,801

    Yes, this is very important. There's no point in...

    Yes, this is very important.
    There's no point in spiliting the template class into .h and .cpp. I found out that other classes cannot use the template class (compile error) when the template is...
  5. Replies
    7
    Views
    8,801

    i find out the problem in the .cpp file: ...

    i find out the problem in the .cpp file:

    chain.cpp:
    #include <chain.h>
    template <class T> Chain <T>::Chain() {}
    // not: template <class T> Chain::Chain() {}

    template <class T> Chain...
  6. Replies
    7
    Views
    8,801

    Thanks for reply. I got another problem, I...

    Thanks for reply.

    I got another problem, I need to use the .h and .cpp, not only .cpp

    I now has something like this, but got error. You can get the defination of QList in here:...
  7. Replies
    7
    Views
    8,801

    how to extend a template class?

    Say, class A is a template class and I want to create a class B which extends class A. What is the correct syntax to do this? I can't find this from the books..

    Thank you in advance.
  8. Replies
    6
    Views
    4,163

    I see. My project is a Linux application which...

    I see.

    My project is a Linux application which provides GUI to manipulate firewall rules. It uses Qt(C++). Only the GUI part is OO. Other modules of the programs invloves parser, system/network...
  9. Replies
    6
    Views
    4,163

    Sorry, I am still frustrated. My project...

    Sorry, I am still frustrated.

    My project develops an GUI interface for some existing programs run in console (eg. a GUI to use SQL instead of using command line). I am still learning OOT now. I...
  10. Replies
    6
    Views
    4,163

    Okay.. Thank you for reply. I have another...

    Okay.. Thank you for reply. I have another question.

    Is that any project can use both Structred approach and OOT? It seems OOT foucs on class & objects. But what if I do not have class and...
  11. Replies
    6
    Views
    4,163

    software development approach...

    OOT is Object Oriented Technology which uses UML, Use Case, Class Diagram, Sequence Diagram.... and etc.

    Structure Approach uses Data Flow Diagram, Entity Relationship Diagram, Structure Chart......
  12. OOT is Object Oriented Technology which uses UML,...

    OOT is Object Oriented Technology which uses UML, Use Case, Class Diagram, Sequence Diagram.... and etc.

    Structure Approach uses Data Flow Diagram, Entity Relationship Diagram, Structure Chart......
  13. OOT vs Structured Approach in open source software development

    Do you use OOT (not only OOP) methodology in open sourced software development?

    I have a hard time to adopt a methodology for my project. The project is a firewall GUI and it uses Qt and C++.
  14. Replies
    1
    Views
    5,732

    popen and fgets problem

    I use popen to get the output of a process, and fgets to read a line. But if the process is still running, will I get buffer overflow (line)in the fgets?

    char [2048] line;
    FILE *fd;

    fd =...
  15. Replies
    5
    Views
    1,899

    how to get output of a process?

    First, I ask the user name and password to start a telnet/ssh session. Then I want to get the output of the telnet/ssh session to deterrmine the next action.

    Use popen? The telnet/ssh session is...
  16. Thread: free and seg fault

    by dkt
    Replies
    5
    Views
    1,835

    Yes, yes and yes. getopt has an integer (optind)...

    Yes, yes and yes. getopt has an integer (optind) which remembers how many times it has parsed. getopt is designed to parse command line argument and optind =0 at start. So I have to reset optind to 0...
  17. Thread: free and seg fault

    by dkt
    Replies
    5
    Views
    1,835

    how to allocate memory from the heap for...

    how to allocate memory from the heap for parse_argv?:confused:
  18. Thread: free and seg fault

    by dkt
    Replies
    5
    Views
    1,835

    free and seg fault

    Hi,

    I want to prase the options twice but no luck. It seg fault at free. See the code attached.
Results 1 to 18 of 18