Yeah I know how to do the executing, I just need a little help on the array splicing first.
Edit: Student lab
Type: Posts; User: INFERNO2K
Yeah I know how to do the executing, I just need a little help on the array splicing first.
Edit: Student lab
Hello,
I am looking for an easy way to splice an array (full of commands). It is an array full of commands and pipes for the bash shell
Example, if I pass an array like the following into a...
Rest of the code
argv[i++] = strtok(cmd, " \t\n");
while (i < MAX_TOKENS && (argv[i++] = strtok(NULL, " \t\n")) != NULL);
Hi,
I seem to have forgotten how to traverse a string of unknown size using a char pointer.
Example:
char *argv[MAX_TOKENS];
** Solved **
Made the votecast a double. Why would this make a difference, I am curious
I am getting a rediculous console error I dont understand on the following code
I have a structure that looks like this
struct courses{
int courseNumber;
char courseCode[5];
double...
Same result using a struct timeval
int send_Courses_Menu(int clientSocket){
int i, retval;
fd_set writefds;
struct timeval to;
to.tv_sec = 3;
I'm still getting the read "hang" on the client. I am not sure what I am doing wrong.
Server function
int send_Courses_Menu(int clientSocket){
int i, retval;
fd_set writefds;
int send_Courses_Menu(int clientSocket){
fd_set writefds;
int i, retval, bytes_written;
FD_CLR(clientSocket,&writefds);
FD_ZERO(&writefds);
FD_SET(clientSocket,&writefds);
...
If I have a function that's main purpose is to write(); to a client that expects a read(); in a function, do I want my select(); to use the read or write argument of the function call?
Example:
...
What if I wanted to compare for whitespace, can I use the second parameter as a character,
'\n'
Or would I need to convert that to a string?
With the following code I am recieving the error in the first parameter of strcmp
void strip(char original[], char stripped[]){
// Remove whitespace characters
for(int i = 0;i <...
template <class TYPE>
class Hash{
public:
Hash(int max, int cap);
Hash();
virtual ~Hash();
virtual bool remove(const char* key)=0;
virtual bool find(const char* key, TYPE&...
Well Hash is an abstract class and the only other time I refer to it is in another classes constructor as well, for base initialization
template <class TYPE>
LPHash<TYPE>::LPHash(int max,...
"The constructor initializer is unexpected. All bases and members have been initialized."
Code is
template <class TYPE>
ChainHash<TYPE>::ChainHash(int max):Hash(max,max){
h_size = 0;...
If the array is 3 elements big and I found what I want to remove at element 3, nothing moves
if I found it at element 2, then element 3 goes into element 2 leaving element 3 empty
Will that work ofr any array size?
If my array is quite large how might I do this in a loop (its array datatype is TYPE <template class TYPE>)
How would I reorganize an array?
Lets say I have an array of an unknown data type that I chose to remove by simply overwriting that index number by its following members
So for example, I...
For example
12 5 24.5 76.2 11.2 43.7
13 7 13.2 54.9
14 9 11.7 11.5 23.2
I know the first two variables I need to store are
"%d %d"
How should I go about reading each line in the text...
How to remove every node of the list.
I came up with this code but I come up with an unhandled windows32 exception upon runtime.
template <class T>
bool CList<T>::remove(){
...
Any tips on how to do this?
Hello folks, I am working ona a circular double linked list and trying to overload the operator= operand but I think my logic is false.
It takes in a linked list and inserts the data into the...
Ill try something else, im getting access violation errors with that.
struct Resort{
double
weeklyPrice;
unsigned int
facilities;
char
name[41],
location[31],
country[29],
agentPhone[15];