473,396 Members | 1,834 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.

warning: passing argument 1 of âtcflushâ makes integer from pointer without a cast [e

FILE *err_fp, *barcode_ffd;
C++ code 64 bit LINUX.
.
.
barcode_ffd = fopen(barcode_printer,"w");
.
.
tcflush(barcode_ffd,TCIOFLUSH); /* clear out buffers for printer */

THE TCFLUSH gives me the error, what code is needed to fix this...
Feb 10 '18 #1
1 2088
weaknessforcats
9,208 Expert Mod 8TB
barcode_ffd is a FILE*.

the tcflush argument is an int and the return is also an int.

The compiler is telling you that a FILE* is not an int.

I suspect that tcflush is not the function you want. Instead you may want the flush for a FILE*. That function is:
Expand|Select|Wrap|Line Numbers
  1. int fflush(FILE *stream);
  2.  
so your code fix is:

Expand|Select|Wrap|Line Numbers
  1. fflush(barcode_ffd);
Feb 10 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Dawn Minnis | last post by:
Hi When I compile my files I get the following: driver.c: In function `main': driver.c:49: warning: assignment makes integer from pointer without a cast driver.c:50: warning: assignment...
2
by: francescomoi | last post by:
Hi. I'm trying to compile this piece of source: ------------------------------------------- int id; while(row1 = mysql_fetch_row(rs1)) { id = atoi((int)row1);...
3
by: sd2004 | last post by:
I am still learning, could someone show/explain to me how to fix the error. I can see it is being wrong but do not know how to fix. could you also recommend a book that I can ref. to ?...
16
by: jimjim | last post by:
#include <stdio.h> #include <stdlib.h> //WARNING: The function's signature should be: f( int ** ) void f(int *ip) { static int dummy = 5; *ip = &dummy; } int main(){
3
by: mrmattborja | last post by:
Hello, Here is a program I'm playing around with for fun in the process of learning C. The objective is to create a function filesize() and call it from within the main() section to retrieve the...
2
by: curious2007 | last post by:
I get this long and hard to understand warning when I call a constructor: AssocArray<double, string> myAssocArray(names, myArr); the code for the constructor: template <class V, class AI,...
17
by: matevzb | last post by:
I've ran into some fishy code that, at first glance, is buggy, but it seems to work correctly and none of the compilers I've tried (five so far, on various systems) gives any warnings. The code:...
1
by: woods1313drew | last post by:
The following code in c+ gives me the warning assignment makes integer from pointer without a cast. destination is set as char destination to limit the input string to 10 characters. name is an...
1
by: anu29dolly | last post by:
error:return makes integer from pointer without a cast.. following is my code ..plz help to track the bug ......... #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.