I have solved.
My previous function return only a char.
The new solution is :
void stringReceived(int sockDesc,char &s){
char unsigned c;
int i=0;
int n;
do {
Type: Posts; User: nick048
I have solved.
My previous function return only a char.
The new solution is :
void stringReceived(int sockDesc,char &s){
char unsigned c;
int i=0;
int n;
do {
Please,Must I to modify my function in this way?
char* stringReceived(int sockDesc){... }
I have tried, but without result.
Bye
Hi
In the main I have declared a variable
char string[100];
I need to construct this variable with a function and I have written the code:
char stringReceived(int sockDesc){
char...
Hi to all,
I have founded a problem in my program; it is in this code:
i=0;
charRecv = recv(nSocketDesc, &c, 1, 0);
while (c !='\n')
{
mystring[i++]=c;
...
Hi to all,
I need to send from server to client a numeric information. If the info is a string, I write
send(newsocketfd, MyMsg, sizeof(MyMsg),0);
If is numeric how can send the value? for...
Hi to All,
Foollowing Your suggestion, I have written this code:
#include <stdio.h>
#include <string.h>
#include <malloc.h>
Hi to all,
I have this program:
/*** HERE the various #define ***/
#define BUFLEN 100
Ok,
But my problem is this:
In the struct, each node can be for example
"My oncle is the oncle of Martin"
"My oncle is engeener"
etc.
I need to count the occurencies of word "oncle" in...
Hi to All,
I need to search the string occurencies in a structure like this:
struct node
{
char info[BUFLEN];
struct node *next;
};
Thank You,
It's work.
Bye
Hi to all,
I have this declaration:
struct node
{
char info ;
struct node *next ;
Hi,
I a my server program I have in the main this code:
int main(int argc, char *argv[])
{
char ctrl_terminator[3];
char terminator[3]={'.','.','\n'};
char msg[BUFLEN];
Hi to All
Thanks for Your reply
Nick
Hi to all,
Thank You for reply.
Nick
Hi to all,
I have a problem in a little server program written with C.
This is the code of main:
int main (unsigned argc, char **argv) {
int sock, client_len, fd, received;
struct...
Hi to All,
I have written a little server that work fine.
Now I need to add a function in the main that process a phrase, passed from a client as telnet. The last part of main is:
...
Nino. It is a lapsus
Sorry,
but I have worked a lot and I am tired. The eyes close and also the brain.
Thank You.
Nimo
I have this function
void verifyMatrix(int n, int m, char *orig, char **mat)
{
char verifyString[5];
int k;
k=0;
// Creating a string
for (int i=n; i<(n+DIM);...
Hi,
I have make your suggest modification, but the program don't run.
Have You try with my code ?
Can You to post the code modified, in order to verify my errors ?
Thank You
gaetano
Thank You for reply.
This is the complete code:
#include <iostream>
using namespace std;
#define DIM 2
#define ADIM 5
char firstString[5];
char secondString[5];
void fillMatrix (char...
Hi to All
I am a new user of C++ an d I need help.
this is part of my program:
#define ADIM 5
...
char *otherString(char *Strings);
Hi,
Thank You for fast reply.
Please, what is vector of vectors ?
Have You a sample or a link, in order to learn this concept ?
Best Regards
Hi to All,
I need to fill a matrix as this:
char mat [N] [N]
N is an integer, that I don't know.
In my program I have a construct for its Input as this.
cin >> N;
Yes, I can use this.
Thank You.
Nino