473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

lookup message trying to write to a file

Dear all,
I get the following message:

lookup 0x08048000 0x00000358 -0xb7e74000 0x000560c0 /1 fwrite

executing:

FILE * data_file = fopen("patterns.ptt", "w");
if(data_file!=NULL){
char ppt[] ="patterns:";
fwrite(ppt,sizeof(char),strlen(ppt),data_file);
...
fclose(data_file);
}
The same message is thrown using any of these other functions:
fputc('\n',data_file);

fputs("inputs:\t",data_file);

fprintf(1,"%d",inputs);

Does anyone know the reason?
Thanks in advance,

Apr 9 '07 #1
3 1197

<ju**********@gmail.comwrote in message
news:11*********************@q75g2000hsh.googlegro ups.com...
Dear all,
I get the following message:

lookup 0x08048000 0x00000358 -0xb7e74000 0x000560c0 /1 fwrite

executing:

FILE * data_file = fopen("patterns.ptt", "w");
if(data_file!=NULL){
char ppt[] ="patterns:";
fwrite(ppt,sizeof(char),strlen(ppt),data_file);
...
fclose(data_file);
}
The same message is thrown using any of these other functions:
fputc('\n',data_file);

fputs("inputs:\t",data_file);

fprintf(1,"%d",inputs);

Does anyone know the reason?
Thanks in advance,
You need to pass data_file as the first argument to fprintf(). However the
rest of the code looks fine. There is some sort of internal error in the
file system. Try a new name and a different physical drive.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Apr 9 '07 #2
ju**********@gmail.com wrote, On 09/04/07 16:34:
Dear all,
I get the following message:

lookup 0x08048000 0x00000358 -0xb7e74000 0x000560c0 /1 fwrite

executing:

FILE * data_file = fopen("patterns.ptt", "w");
if(data_file!=NULL){
char ppt[] ="patterns:";
fwrite(ppt,sizeof(char),strlen(ppt),data_file);
...
fclose(data_file);
}
The same message is thrown using any of these other functions:
fputc('\n',data_file);

fputs("inputs:\t",data_file);

fprintf(1,"%d",inputs);

Does anyone know the reason?
Yes, you have an error somewhere in the code you have not shown us.
Please provide a small, complete, compilable example program that
exhibits the problem.
--
Flash Gordon
Apr 9 '07 #3
In article <11*********************@q75g2000hsh.googlegroups. com>,
<ju**********@gmail.comwrote:
>I get the following message:

lookup 0x08048000 0x00000358 -0xb7e74000 0x000560c0 /1 fwrite
This looks like some kind of debugging message from the dynamic loader
on a Linux system. Unfortunately, all one can say is that there's
probably an error somewhere in your code that is causing it to be
printed. If you can post a short *complete* program that provokes the
error, we may be able to help you.

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Apr 9 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: John Collyer | last post by:
Hi, In assembly language you can use a lookup table to call functions. 1. Lookup function address in table 2. Call the function Like: CALL FUNCTION
3
by: Julius Mong | last post by:
Hi all, I'm doing this: // Test char code wchar_t lookup = {0x8364, 0x5543, 0x3432, 0xabcd, 0xef01}; for (int x=0; x<5; x++) { wchar_t * string = (wchar_t*) malloc(sizeof(wchar_t)); string =...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
3
by: Andy G | last post by:
I have a page that is used for the user to edit their information on file. I need to lookup all of their info using their ID. Do I use a lookup function on each text box/drop down list or should I...
1
by: sierra467 | last post by:
I realize that lookup fields in a table should not be used but that is the way this particular creator has done. Could someone help me by answering my question. I am trying to run a...
18
by: yinglcs | last post by:
Hi, I have a newbie XSLT question. I have the following xml, and I would like to find out the children of feature element in each 'features' element. i.e. for each <featuresI would like to...
11
by: Paul H | last post by:
Suppose I have a table called tblPeople and I want a field to illustrate whether each person prefers cats or dogs. I could do it one of three ways. 1. A plain text field Create a text field in...
6
by: =?Utf-8?B?TWlrZVM=?= | last post by:
I have searched Google with every possible combination of key words I can imagine and have not been able to find an answer to what I think is a very simple question and probably has a very simple...
11
by: ianoble | last post by:
I've been trying to piece together various code snippets to create a lookup table inside my xslt without the need for a supplemental xml file. Here is what I have so far. As of now, it does not...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.