473,795 Members | 3,231 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

`make` Error that is confusing me...

Hey all,

I'm working through the book "GUI Programming with Qt3" and have
worked my way through Chapter 4, creating a small spreadsheet
application. I'm finally to a point where I can compile the program
and see how it looks, but I keep get some cryptic error that I don't
understand. Maybe you all can help me out here.

I've created many files and have all of them included properly in my
implementation files, so I know the problem is not there. The error
that I'm getting is as follows:

-----------------------------------------------------------------------------------------------------------------------------------
spreadsheet.h: In member function 'bool Spreadsheet::au toRecalculate()
const':
spreadsheet.h:1 9: error: argument of type 'bool (Spreadsheet::) ()'
does not match 'bool'
make: *** [mainwindow.o] Error 1

-----------------------------------------------------------------------------------------------------------------------------------
The file in question, spreadsheet.h, has the following on line 19:

bool autoRecalculate () const { return autoRecalc; }

Now, I don't understand what the compiler is trying to tell me with
the statement, "argument of type bool (SPreadsheet::) () does not
match bool". Any help with this is greatly appreciated. Thank you
all for your time.

Cheers,

Sean Carrick
PekinSOFT Systems
PekinSOFT at gmail dot com
Mar 1 '08 #1
2 1404
<Pe*******@gmai l.comwrote in message news:
02************* *************** **...legroup s.com...
The file in question, spreadsheet.h, has the following on line 19:

bool autoRecalculate () const { return autoRecalc; }

Now, I don't understand what the compiler is trying to tell me with
the statement, "argument of type bool (SPreadsheet::) () does not
match bool".
You didn't give a lot of information so this is a guess.

Is autoRecalculate () a member function of something? What about
autoRecalc, what is that? Is it a function? If so the line should be
this:

bool autoRecalculate () const { return autoRecalc(); }

Note the parentheses. That calls autoRecalc() and returns the result,
rather than returning a function pointer which can't be converted to a
bool.

Is autoRecalc a variable? If it is, then your error is from something
else, you need to give more context.

Is autoRecalc a macro? If it is, see what it is #defined to. That may
be causing a problem.

Jason
Mar 1 '08 #2
On Mar 1, 10:58 am, PekinS...@gmail .com wrote:
>
bool autoRecalc();
Jason,

Thank you again for your help, but I do believe that I just found my
mistake. Notice my declaration of the autoRecalc variable. I'm a
moron and put parens after it for some reason. I've deleted the
parens and am rerunning `make` as I type...

OK, that error is gone! However, I've now got a bunch more that I
need to look at. Thanks again for your help. I hope you have a great
day.

Cheers,

Sean Carrick
PekinSOFT Systems
PekinSOFT at gmail dot com
Mar 1 '08 #3

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

Similar topics

8
18471
by: John | last post by:
Hello. I am currently working through a book on Dreamweaver and using PHP. I am having a little trouble with setting up the database though. I have php 4.2.3 and MySQL 4.0.20a. I am running locally with Apache 1.3.27 on Windows XP Pro. I seem to have finally got MySQL running after a lot of difficulty. In the book it says to type source C:\mysql\newland_tours.sql at the mysql> prompt, to generate the newland_tours database in my...
12
10375
by: James Lankford | last post by:
Hello group: I have reached the end of my rope with this error. I have pretty much tried every suggestion I've found thus far and I get this error no matter what I do. I did try using the CDOSYS test from Microsoft as a test for the smtpserver, and it'll send that way. Here's my existing code: Public Sub SendMail() Dim myMailMsg As New Mail.MailMessage()
2
1343
by: Don | last post by:
If you expose an object as a property in a VB.NET class, like so: public class MyClass private obj as NestedClass Public Readonly Property NestedObj as OtherClass Get return obj End Get End Property
42
3173
by: Martin Jørgensen | last post by:
Hi, I'm trying to move a matlab program into c language. For those who knows matlab, this is the line I want to program in c: hx(1:nx,1:ny) = 0; % nx=10, ny=10 It works on a 2-dimensional array (size is 10*10), setting all the values inside the 10*10 matrix to zero. My C-function looks like this:
6
5655
by: Bobrick | last post by:
Hi. Thanks to everyone who replied to my last post, it turns out it wasn't the line where I was trying to treat the variable in question as an array which was the problem, but the line above. char temp; std::vector<unsigned charmmessage; while (!done){
7
13080
by: aaragon | last post by:
Hi everyone, I have a simple question. I'm trying to make a macro in one file so I can use it in main.cpp. The idea is that I the user of my code has simple to type the macro definition to replace a more complicated code. Something like the following: // file.h #define OBJECTIVE template <class T\ void operator()(T& chrom_,double* fitness_); // file main.cpp
3
7344
by: Ronald S. Cook | last post by:
I have a function in which I'm trying to make the parameter optional. However, when I put Optional in front of ByVal below I get the error "optional parameters cannot have structure types". Public Function SelectPenType(ByVal PenTypeID As Guid) As DataSet Implements IPen.SelectPenType Any idea how I should be doing this? Thanks,
36
2130
by: anon.asdf | last post by:
Hello! Can the proprocessor make conditional decisions. Here's an example of the functionality (not standard C!) #define PUT_BYTE(const_index, val) \ #preprocessor_if (const_index == 0) \ ({ *(77) = (val); }) \ #preprocessor_else_if (const_index == 1) \ ({ *(99) = (val); }) \
15
2921
by: Michael B Allen | last post by:
I like to use limit pointers as sentinels when working on buffers of data. Meaning I use ptr < lim where ptr and lim are both pointers rather than n 0 to determine if it is safe to proceed writing to that location. The rationale is that it is simpler and thus safer because you're not constantly recomputing integer n. However, I've run into a case where this fails and I'd like to know what the experts would do. If I want to precompute...
0
10435
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9037
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6779
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.