Thanks,
I was using sscanf but ran into few problems as I could not keep track on the elements, so I used fscanf.
Type: Posts; User: Nish
Thanks,
I was using sscanf but ran into few problems as I could not keep track on the elements, so I used fscanf.
I cannot understand how to read the fields. I do use fgets to read line by line from the file. But I cannot understand how to read specifically the "0" then the "180" and so on.
Hello All,
I have to read a file which contains colums such as below.
Net Name #Pins Driver Recvs. (block, pin)
0 i_63_ 3 ( 0, -1) ( 180, 0) ( 226, 0)
1 i_50_ 14 ( 1, -1) (...
The part for which I need my function is indicated by start and end
for (k=0;k<40;k++)
{
xtemp = Y->Array[k];
//start
Nline = xtemp->line_used;
Hi Thanks for that but the problem is when I use this function I get a result which is different if I implement it without the function.
I need to pass a pointer to a linked list too so my function...
Hi all,
I need to ask this: I need to modify the value of some variables by calling another function.This has to do with elements of a linked list.
for example:
funct1()
{
int a,b,c;
...
OK there is a thing I am not understanding. In my decode function after I get all the variables I check to see if CHAN is X or Y if X i put values of x in x1 y in y1 else if Y i put x in x2 and so...
Great.
I get it now.
Well OK now we have finished the file reading. So I have my values for cordinates and track nos. I check if type is X or Y and accordingly set them as x1 or x2 etc.
Now I come...
Hi Salem,
I was just confused after reading this post, I need to read the file and I cannot copy the contents as you have shown. As I said the file is around 4KB and hence has a lot of data similar...
My File starts like this. Also the file is really big: around 4 K so what effect will that have on my buffer as I dont think I will be able to use such a big buffer to read the entire contents of the...
Hi Salem,
I read the feof in the FAQ. I was trying to use the strncmp. The first condition is checked fine. But when I have to check the next element to see if its an X or Y, I cannot use the...
Hi,
I came up with this.
I need to fill the list depending on the values of x1,x2,y1 etc and need to do the comparison everytime I get a new values for them.
Hence I out them at the start of the...
Ok if I could get a little help.
Is it possible that I use one function that fills my list and one that reads the file and within the function that reads my file I call the function to fill my list....
Hi Salem,
I suppose my function would contain the same code as my main. I was thinkning of writing a function once this part works but as it is not working I did not go on to writing a function.
...
Hi,
For the second part of my code (Part 1 is titled Linked List and Array of POinters) I need to fill in the Linked List with values for the line_used from a file. The file has the following...
Hi,
For the second part of the code I need to fill in the Linked List with values for the line_used from a file. The file has the following format:
Array size: 17 x 17 logic blocks.
...
Hey bithub,
Thanks a lot. It seems to be workng now without giving me an error.
Shall be back with some more questions as they come along.
Hey guys. I need to write a program that initializes a switch matrix type of structure. The switch matrix structure is like this.
The switch matrix consists of 10 pins up 10 to the left 10 to the...