473,657 Members | 2,574 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'identifier display cannot have type qualifier'

2 New Member
i'm getting an error 'identifier display cannot have type qualifier' near the bold portion. what's wrong???
Expand|Select|Wrap|Line Numbers
  1. #include<iostream.h>
  2. #include<conio.h>
  3. #include<stdio.h>
  4. #include<stdlib.h>
  5. class matrix
  6. {
  7. private: int a[20][20],m,n;
  8. public:
  9. void getdata();
  10. void display();
  11. matrix operator+(matrix c) ;
  12.  
  13. };
  14. void matrix::getdata()
  15. {
  16. cout<<"enter size"<<endl;
  17. cin>>m>>n;
  18. cout<<"enter elements"<<endl;
  19. for(int i=0;i<=m;i++)
  20. {for(int j=0;j<=n;j++)
  21. cin>>a[i][j];
  22.  
  23. }
  24. void matrix::display()
  25. {
  26. for(int i=0;i<=m;i++)
  27. {
  28. for(int j=0;j<=n;j++)
  29. cout<<a[i][j];
  30. cout<<endl;
  31. }
  32. matrix matrix :: operator+(matrix c)
  33. {
  34. matrix l;
  35. if(m!=c.m||n!=c.n)
  36. {cout<<"sdsd";
  37. exit(0);
  38. }
  39. else
  40. {
  41. l.m=m;
  42. l.n=n;
  43. for(i=0;i<=m;i++)
  44. {for(j=0;j<=n;j++)
  45. l.a[i][j]=a[i][j]+c.a[i][j];
  46. } }
  47. return l;
  48. }
  49.  
  50. void main()
  51. {
  52. matrix x,y,z;
  53. clrscr();
  54. x.getdata();
  55. y.getdata();
  56. z=x+y;
  57. z.display();
  58. getch();
  59. }
  60.  
May 14 '11 #1
3 21671
weaknessforcats
9,208 Recognized Expert Moderator Expert
There's no closing parenthesis on matrix::getdata ().
May 14 '11 #2
abhijit mudugan
2 New Member
here i get en error 'improper use of typedef 'matrix''
matrix matrix :: operator+(matri x c)
{
matrix l;
if(m!=c.m||n!=c .n)
{cout<<"sdsd";
exit(0);
}
May 15 '11 #3
weaknessforcats
9,208 Recognized Expert Moderator Expert
It's the same issue as before. There is no closing } on matrix::display ().
May 15 '11 #4

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

Similar topics

2
2089
by: dave | last post by:
Hi I m facing strange problem... I have one field char type data length 1.. It has data either 1 or 2 in all the field tht I have checked through enterprise manager. I'm running query "select * from table" and fetching all the records and displaying... It display all the data except data from this
1
3469
by: bjgriswold | last post by:
Has anyone every seen this issue where the Forms 4.5 GUI comes up but you are unable to type anything into the username or password fields? We are using NT 4 SP 6 (TSE) with Citrix 1.8. The GUI comes up with no problems -- you simply cannot type. Interestingly, you can tab to each field and the command buttons, and use the space bar. And if you login with these fields blank, a dialog box pops up that is also empty. Sounds like a font...
27
5588
by: alexdoulou | last post by:
Hello, I am trying to type greek fonts into common html forms on the Internet explorer but erroneous text is being typed instead of clear greek. Greek language pack is installed correctly. Encoding for greek is OK. What is the problem?
11
2932
by: ZRexRider | last post by:
This may be an easy question but I've been reading for about a half hour and experimenting without results. I simply want the results of my query to display a specific field that is typed "money" using + and - The program that consumes the data expects + on positive numbers and - on negative. I was hoping to do it in the view instead of processing the results with the VB application that interogates the DB.
3
1971
by: felix.dorner | last post by:
Hi. I have problems validating the following document doc.xml using onsgmls. I call onsgmls like this: >onsgmls -s /usr/share/sgml/xml.dcl doc.xml the output is: onsgmls:1_3_b.xml:2:19:W: cannot generate system identifier for document type "contacts" onsgmls:1_3_b.xml:14:0:E: reference to entity "contacts" for which no system identifier could be generated
8
4572
by: minseokoh | last post by:
Hi, Could someone explain why "const" is located after the function name and what it means? inline unsigned char *access(int off) const { if (off < 0) abort(); return (&bits_); }
4
2222
by: Ben Petering | last post by:
Hi group, this is a 'best practice' type question (I want discussion of the issue - whys and why nots - similar to "casting the return value of malloc()", to cite an analogous case). Let's say I have a function written in assembler/(some non-C language) which takes one pointer-to-const-char arg, the declaration being: extern unsigned int str_len(const char *s);
1
1857
by: bernie77 | last post by:
Originally, I have the a panel with a drop down list and a radio button list (2 controls). Now user requests the capability to dynamically show the second control depending on user selection in the first control (drop down list). Sometimes the 2nd control can be a radiobuttonlist, sometimes the 2nd control can be another dropdownlist. How can I use code behind (in C#) to display the appropriate control at proper place of the panel? Any...
0
8823
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
8730
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...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6163
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
5632
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
4151
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
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.