473,499 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error C4430 please help ...

2 New Member
Am a new programmer to the c++ language , i used to program and see the result of my programming in the easy way because i used turbo c++ program , but now i am using microsoft visual studio program to write and build my programs , now i am sort of lost because it's a new whole environment for me , the problem is that i had this program that i wrote and it was working on turbo c++ but now i get this error

Error 1 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int


my program is :

Expand|Select|Wrap|Line Numbers
  1.  
  2. #include "StdAfx.h"
  3. #include <iostream>
  4. using namespace std;
  5. main()
  6. {
  7. double  a,b,c;
  8. char g;
  9. cout<<"\n\n          _____________________________\n";
  10. cout<<"\n\n          ((   Currency  Converter   ))\n\n";
  11. cout<<"          _____________________________";
  12. choice:
  13. cout<<"\n\n1-U.S Dollar To Iraqi Dinar  \n2-Iraqi Dinar  To U.S Dollar \n";
  14. cin>>c;
  15. if (c==1)
  16. choice2:
  17. {
  18. cout<<"\n\n  _________________________________________________";
  19. cout<<" \n\n  ((__$ U.S Dollar  To Iraqi Dinar Exchanging $__))";
  20. cout<<"\n\n __________________________________________________";
  21. cout<<"\n\n U.s Dollar :";
  22. cin>>b;
  23. cout<<" \n It Equals ( "<<b*1200<<" ) In Iraqi Dinar ";
  24. cout<<"\n\n Choose Again ? Y/N \n ";
  25. cin>>g;
  26. if (g==*"y")
  27. goto choice ;
  28. else if (g==*"n") goto ending;
  29. }
  30.  
  31. else if (c==2)
  32. choice3:
  33. {
  34. cout<<"\n\n  _________________________________________________";
  35. cout<<" \n\n  ((__$ Iraqi Dinar  To U.S Dollar Exchanging $__))";
  36. cout<<"\n\n __________________________________________________";
  37. cout<<"\n\n Iraqi Dinar :";;
  38. cin>>a;
  39. cout<<" \n It Equals ( "<<a/1200<<" ) In U.S Dollar ";
  40. cout<<"\n\n Choose Again ? Y/N \n ";
  41. cin>>g;
  42. if (g ==*"y")goto choice;
  43. if (g ==*"n")goto ending;
  44. else goto blablabla;
  45. }
  46.  
  47. else
  48.  
  49. {
  50. cout<<"\n Error ... Please Choose The Correct Choice \n\n ";
  51. goto  choice ;
  52. }
  53. blablabla:
  54. cout<<"Bla Bla Bla ";
  55. ending:
  56. cout<<" \n\n\a *** ^_^ Thanks For Choosing My Modest Programs ^_^ *** ";
  57. return 0;
  58. }
  59.  
thank you , and sorry for taking some of your precious time , hope that you answer me soon as possible ...

Greetings
Ghayth Al-Jomailee
Feb 4 '12 #1
4 2020
coderHead
6 New Member
The main() function should have an int return type, lie this:
int main()

Other languages may let you omit the return type and then just assume it to be type int. However, C++ doesn't do that - you must specify the return type for all functions.
Feb 5 '12 #2
bravejuba
2 New Member
I just did What you said and its the same error :
Error 1 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Feb 5 '12 #3
coderHead
6 New Member
Well I simply placed int in front of main() like this:

int main()

I was able to compile your program and it ran fine. It said that 5 US dollars are equal to 6000 Iraqi Dinar.

Make sure you are not capitalizing anything, like Int. Make sure it is lower case.
Feb 5 '12 #4
whodgson
542 Contributor
It ran OK for me in Dev-C++ (with and without int pre- main())
Feb 5 '12 #5

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

Similar topics

3
31173
by: John | last post by:
Hi, I am working on a legacy code. Following is a line of the code which complies with Visual C++.NET 2003 but not with Visual C++ 2005: for ( int i = 0; i < (const)(X.size()); i++ ) {}// X is...
2
4138
by: Suhas Vengilat | last post by:
Hi All, I have a couple of stored procedures written in SQL 2000. Given below one sp. ***************************************************** ALTER PROCEDURE . ( @AcTypeName varchar(50),...
2
5337
by: darko | last post by:
ok, i'm just starting out, with c++ and i downloaded some wideos, i'm working on VS.NET 2005, and hthe first script is helloworld #include <iostream> main() { std::cout << "Hello World"; }...
1
11561
by: Bit Byte | last post by:
The following function pointer declarations used to compile without any problems in VS7.1, now when I try to compile in VS8, I get a C4430 error. Anyone knows why, and how to fix it (without using...
4
2318
by: fatboySudsy | last post by:
Hi, I have constructed a client program that has given me some error codes that i just cannot see. I was wondering if a different set of eyes with much more experience than me could help me out. ...
1
1746
by: pra1983 | last post by:
can any one can help i am getting an error saying "missing type specifier - int assumed in line 332" but my line of that part are.... 332: getchar(); 333: getchar(); 334: for( i=0 ;...
12
39087
by: slizorn | last post by:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int err how do i fix that error? for example given to this section of code.. Matrix::addMatrix(Matrix m1,...
1
2249
by: ornit | last post by:
What caused this error: c4430?
1
3224
by: Dean Evans | last post by:
Hi, This is my first OOP in C++ and having lots of probs. Below is an abstract class for an abstract factory problem. I get the compiler error as shown in the heading. Thanks for any tips ...
1
7033
by: ibjou | last post by:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int. That´s the answer I get when program is compiled. How can I fix that error? Here you have the .cpp...
0
7006
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
7169
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
7215
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...
1
6892
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...
0
4597
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...
0
3096
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...
0
3088
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
294
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...

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.