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

double to double error in c++

I am getting a (cannot convert double to double in assignment errors) here is a part of my code

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
#define MaxSize 1000

double loancalc (double *months, double *intrat, double *princ, double calcprnc[], double calcpay[], double calcbal[], double calcnew[], double calcInt[]);
double display (double *months, double calcprnc[], double calcpay[], double calcbal[], double calcnew[], double calcInt[]);


main ()
{
double mnths;
double *months;
months = mnths;
double ints = .09;
double *intrat;
intrat = ints;
double prin = 10000;
double *princ;
princ = prin;
double calcprnc[MaxSize], calcpay[MaxSize], calcInt[MaxSize];
double calcbal[MaxSize], calcnew[MaxSize];
int choice;
Aug 3 '07 #1
2 5573
r035198x
13,262 8TB
I am getting a (cannot convert double to double in assignment errors) here is a part of my code

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
#define MaxSize 1000

double loancalc (double *months, double *intrat, double *princ, double calcprnc[], double calcpay[], double calcbal[], double calcnew[], double calcInt[]);
double display (double *months, double calcprnc[], double calcpay[], double calcbal[], double calcnew[], double calcInt[]);


main ()
{
double mnths;
double *months;
months = mnths;
double ints = .09;
double *intrat;
intrat = ints;
double prin = 10000;
double *princ;
princ = prin;
double calcprnc[MaxSize], calcpay[MaxSize], calcInt[MaxSize];
double calcbal[MaxSize], calcnew[MaxSize];
int choice;
Read your error messages. They do not say double to double. After that if you go to the line numbers they are pointing to, you should be able to see why the compiler is complaining.
Aug 3 '07 #2
JosAH
11,448 Expert 8TB
Expand|Select|Wrap|Line Numbers
  1.      double mnths; 
  2.      double *months; 
  3.      months = mnths;  
  4.  
*ahem* there they are; but what I find more frightening are those functions taking
an entire sweep of parameters. Shouldn't these parameters be somewhere in a
class object so your function can politely ask for the values, given an object of
that class as a single parameter?

kind regards,

Jos
Aug 3 '07 #3

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

Similar topics

3
by: Mensan | last post by:
I am trying to compute the differnece between two dwords in visual basic and keep getting the wrong value being computed. I have the following structure defind: Public Type HighLowQuote...
12
by: Sydex | last post by:
When I compile code I get error C2664: 'Integration::qgaus' : cannot convert parameter 1 from 'double (double)' to 'double (__cdecl *)(double)' in this part : double Integration::quad2d(double...
7
by: Arcane | last post by:
I'm having trouble workin with a simple CList: the function always adds the first element twice and I don't know how. also, the later added elements do not appear immediately in the list, but...
0
by: Frank King | last post by:
Hi, I am using CArray and quick sort funciton to sort an array of double type of data points. I found an article in MSDN HOWTO: Quick Sorting Using MFC CArray-Derived Classes ID: Q216858 ...
0
by: David Veeneman | last post by:
This post is for the Google archive and does not require a reply. I received an 'Invalid parameter used' error when trying to do double-buffering with the .Net SetStyles method. I used this code...
1
by: JWest46088 | last post by:
I keep getting these error messages: area(double,double) in Rectangle cannot be applied to () return "Area: " + Rectangle.area() + "\tCircumference: " + Rectangle.perimeter(); ...
11
by: aisling.cronin | last post by:
Hi I am using ctime to convert the following string 1144412677847 .... Please could some one to double check if they get the same result as me (The Time is Sun Nov 02 09:11:51 2031). It seems...
2
by: Zuhaib Hyder | last post by:
please remove double quote error in accessing javascript variable in c# , Page.RegisterStartupScript("MyScript", "<script language=javascript> var thumb = null;thumb =...
1
by: Terry Archer | last post by:
error C2296: '%' : illegal,left operand has type 'double' #include <iostream> #include <fstream> #include <iomanip> using namespace std; const int OUNCES_PER_POUND = 16; const double...
2
by: Tyler Palmer | last post by:
I am having a problem with my program. I cant figure out a solution for the compiler error im getting. In function `double endingConversion(double)': invalid operands of types `double...
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
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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,...

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.