473,382 Members | 1,376 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,382 software developers and data experts.

A simple yet confused query

Hi,
i have a simple query. I was practising a c program using function by just calling the function. The called function are defined with only printf statements. I tried executing the same program in different desktops having the same configuration.When i execute the program, in some machines, am getting an error message "function should have a prototype", meanwhile some desktops are giving me the output. Can anyone say please what can be the error. since i am not passing any values to the function, am confused how to declare the prototype. Please help me.
regards,
naveen
Aug 23 '07 #1
4 1283
JosAH
11,448 Expert 8TB
Hi,
i have a simple query. I was practising a c program using function by just calling the function. The called function are defined with only printf statements. I tried executing the same program in different desktops having the same configuration.When i execute the program, in some machines, am getting an error message "function should have a prototype", meanwhile some desktops are giving me the output. Can anyone say please what can be the error. since i am not passing any values to the function, am confused how to declare the prototype. Please help me.
regards,
naveen
You posted your question in the wrong section; I'll move your question to the C/C++
Forum section.

kind regards,

Jos
Aug 23 '07 #2
ilikepython
844 Expert 512MB
Hi,
i have a simple query. I was practising a c program using function by just calling the function. The called function are defined with only printf statements. I tried executing the same program in different desktops having the same configuration.When i execute the program, in some machines, am getting an error message "function should have a prototype", meanwhile some desktops are giving me the output. Can anyone say please what can be the error. since i am not passing any values to the function, am confused how to declare the prototype. Please help me.
regards,
naveen
Add the prototype like this:
Expand|Select|Wrap|Line Numbers
  1. void theFunc(void);
  2.  
Aug 23 '07 #3
Add the prototype like this:
Expand|Select|Wrap|Line Numbers
  1. void theFunc(void);
  2.  

thanks for ur reply. where to give this code. while declaring or calling? i tried both the places, but still its giving error.
Aug 24 '07 #4
thanks for ur reply. where to give this code. while declaring or calling? i tried both the places, but still its giving error.
if a function is void, it means it doesn't return anything.

this is the declaration of the function:
void function(void).
but when you call it:
function();

thanks;
Aug 24 '07 #5

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

Similar topics

13
by: Samantha Smit | last post by:
Hi, I am trying to create a simple asp page that has one command button that updates a database. The URL of the page is like this: http://MyServer.com/Update.asp?UserName=Tom My asp code is...
7
by: Ot | last post by:
I posted this to the wrong group. It went to m.p.dotnet.languages.vb. Ooops. -------------------------------------------------------------------- I have this tiny problem. I have learned...
2
by: jh8735 | last post by:
I use Access to run reports from various pieces of financial data. The one query that I have been unable to produce, but need is the following: A query that yields all accounts from a person...
7
by: Riley DeWiley | last post by:
I am continually amazed by SQL's ability to humble me .... I have a toy query into a toy database that looks just like this: SELECT . FROM f, fw, w WHERE f.id = fw.fid and fw.wid = w.id and...
13
by: tindog | last post by:
I am brand new to this programming especially C#. I am confused (at the moment). I have bought two books to get started to learn C# language and Visual C#.net 2003 in 24 hours. Which is the best to...
4
by: Phillip Vong | last post by:
I'm a newbie using VS2005 to learn and test. I'm testing against the Northwind DB. I created a simple variable called "myVariable" and I assigned it the character "c". I want my SQL query to use...
11
by: Bruce Lawrence | last post by:
Ok, I'm baffled... I'm making a query in access 97 between 2 tables. There is a field in both tables called "DWGNO". OPENORD has a record with a DWGNO of "00000012345" DIEDATA has a record...
3
by: Jason Mobarak | last post by:
Hello -- I'm attempting to get a handle on how to do xpath queries with System.Xml -- so far the biggest hurdle has been how to deal with a default namespace. If I use the test xml: <?xml...
9
by: Emin | last post by:
Dear Experts, I have a fairly simple query in which adding a where clause slows things down by at least a factor of 100. The following is the slow version of the query ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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?

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.