Hi everyone,
I am trying to save ip addresses and mac addresses of a node in a structure.I dont know how to assign values.Please help.
#include <stdio.h>
#include<iostream>
#define nodes 15
using namespace std;
struct nodes_struct {
char ip[19];
char mac[19];
} ;
int main()
{
char ip[19],mac[19];
nodes_struct object[nodes];
object[0].ip="192.168.1.2";//error
return 0;
}