Hi,
I change my text files here manually which have the data in the following format.
1085961616.474 172 190.104.253.84 TCP_MISS/200 2146 GET http://cfg.mywebsearch.com/mysaconfg.jsp?[07fiG10lKmU4M3R:IQ.TCH] - DIRECT/63.236.66.14 text/html
1085961622.602 60 68.22.217.209 TCP_HIT/200 9476 GET...
Hello everyone,
I am trying to store data in a struct. However it doens't set the values.
I read from a text file the values below and I've also included my code for your review. I've removed the pointers from my structure.
=====
NET09 1 --
NET10 1 --
=====
#include <stdio.h>
#include...
Hi there, I have two structs where I am trying to copy from.
typedef struct {
char *netID[7];
int hopCount;
char *nextHop[2];
}Routers;
Routers one;
Routers two;
I read from file and set one.netID = something...
Actually I want to do more after reading. I want to be able to modify a particular record.
My text file contents are:
NET09 1 --
So after reading in the file if I find NET09 I want to replace 1 by a 2.
In my code i have:
routerD.hopCount=routerD.hopCount++;
while...
Acutally I tried it n it works. However it only reads the first line and exits?
Can somebody help me print everything in the file?
Thanks
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include "se.h"
int main()
{
char buff[10];
Routers routerD;
int rdr...
Hi i have a text file that I am unable to read properly.
Here's what I do.
/* tblD.txt */
NET06 1 --
NET25 1 --
/* se.h */
typedef struct {
char netID[7];
int hopCount;
char nextHop[2];
}Routers...
So in continuation with the current thread, here is what I am doing.
Sending messages from routers B, A and C to Networks 54 and 02. And update routing tables.
Consider this scenario
B <--> NET54 <--> A <--> NET02 <-->C
Initial Routing table for A
Network HopCount NextHop
NET02 1 --...
Thanks for the heads up salem. I will be building a program that simulates behaviour similar to a router. I won't be dealing with real addresses but reading addressing info from text files and have different tables for all the links in the network. I think this post will serve as the base for my...
Hi there,
I need to:
1) Create a pipe, read data from a variable. Write this data to the pipe. Send a message two file2 that pipe is ready to be read. All this in one file
2)Another file which will display message "reading from pipe". Reads until it's done.
to achieve this what I am trying to...
Hi there,
I have a windows service which should copy the file from one server to another. Suppose I created an xml file using xmltextwriter on server 1 location C:\tempp\test.xml, I want the service to copy this file to another server. say another servers C:\inetpub\wwwroot\foldername\. How am...
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.