Hi guys,
I installed tomcat 4,the server works fine (shows up the test page),and the
servlet code compiles, but I can't load it with local:8080
That's what I did:create a directory of 'classes' under
webapps/Root/WEB-INF/,then put my .class file there,but when I tried...
Hi,I wonder how to connect 2 strings in c++ under Unix?
I tried strcat,and the code got stuck(no compiling error,though).
This is what I'm doing:
char* s1="bin";
char* s2="***";
...
cout<<strcat(s1,s2)<<endl;
simply doesn't work! The execution stops at the strcat.
Hi,
I just resolved the problem by getting the command line with getline.(......),and then tokenized it,assigned the values to argv[0],argv[1]...actually no limit needs to be specified.Finally I found out I didn't have to allocate for argv[].
Thanks all!
Yes.Actually I already tried:
struct command_t* command=new command_t;
no success,still showing up
segmentation fault.
The problem is in cin>>command_t->argv[0] (or strcpy),if I assign a constant like
command_t->argv[0]="****";
it doesn't complain.
I wonder do I need to allocate...
Hi,I'm writing a shell in c++ for Unix/Linux,which takes any system command
and execute it.
It's pretty simple now.In the first step,I just want to type certain command
and display it,like this:
#include <iostream>
using namespace std;
struct command_t{
char* name;
int argc;
char...
Hi,I'm using VC++6.0
#include
#include
..
template
class QueueArray
{
public:
....
T Dequeue();
private:
vector > > vecQue;
...
};
template
T QueueArray::Dequeue()
{
...
T item;
item= vecQue[i].back();
vecQue[i].pop();
return item;
}
the line of
vecQue[i].pop();
doesn't compile and the...
Now I need to implement a variable-sized generic QueueArray class that implements an array of queues,and then constructs a QueueArray object intqueue consisting of an array of 10 integer queues using the statement:
QueueArray <int> intqueue (10);
I tried this:
template<class T>
class...
I got 2 cod of parent.c and child.c here:
parent.c:
#include <sys/wait.h>
#define NULL 0
int main(void)
{
if(fork()==0){execve("child",NULL,NULL);exit(0);}
printf("Process[%d]:Parent in execution\n",getpid());
sleep(2);
if(wait(NULL)>0)printf("Process[%d]:Parent...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.