Hi,
how to convert it?
char buffer[1024];
fgets (buffer, sizeof(buffer), fp)
// convert buffer to c++ STL string
Type: Posts; User: dkt
Hi,
how to convert it?
char buffer[1024];
fgets (buffer, sizeof(buffer), fp)
// convert buffer to c++ STL string
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...
I want to execute a program in C. How to get the output of the executed program?
Thanks.
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...
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...
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:...
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.
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...
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...
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...
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......
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......
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++.
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 =...
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...
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...
how to allocate memory from the heap for parse_argv?:confused:
Hi,
I want to prase the options twice but no luck. It seg fault at free. See the code attached.