15,922,574 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by nothingx11x (Top 6 by date)
nothingx11x
29-May-15 19:28pm
View
Now, my question status is not solve. I just want to ask you and everyone how to improve [1], [2], [3], [4]. What is the alternative way to implement the idea which changes from DerivType to double and conversely. Thank you
nothingx11x
29-May-15 18:46pm
View
I am very appriciate if you can help me. If I can ask my teacher, it does not make sense I send a question here.
nothingx11x
28-May-15 17:22pm
View
Do you mean I have to change the code of class DerivType. But in this case, can you tell me how can I change it. I am high appriciate your suggestions.
I just want to "convert" from DerivType to int.
Please help me.
Thank you
nothingx11x
28-May-15 14:58pm
View
Thank for your response. But can you tell me how the new code is, I am sorry,I do not have any idea for new code. How can I fix it and say "convert" a DerivType to int variable. Thank you
nothingx11x
28-May-15 11:23am
View
I am sorry to make disturb you.
The definition of MLPutInteger is MLPutInteger[pointer, int]. That means its second argument has to be an integer. In this case, I want to assign x into this argument, but in this case, x is DerivType. How can I convert x into integer?
nothingx11x
28-May-15 10:58am
View
Deleted
This is the Class DerivType class DerivType;
typedef DerivType (*ddf_FctPtr)(const DerivType&);
class DerivType { private: interval f, df, ddf;
public: DerivType ( ); DerivType ( const interval&, const interval&, const interval& ); DerivType ( const DerivType& );
DerivType& operator= ( const DerivType& );
friend DerivType DerivConst ( const real& );
friend DerivType DerivConst ( const interval& );
friend DerivType DerivVar ( const real& );
friend DerivType DerivVar ( const interval& );
friend inline const interval fValue ( const DerivType& );
friend inline const interval dfValue ( const DerivType& );
friend inline const interval ddfValue ( const DerivType& );
friend DerivType operator+ ( const DerivType& );
friend DerivType operator- ( const DerivType& );
....
And I have a function likes this
DerivType f ( const DerivType& x ) // Sample function { DerivType result;
int sum;
MLPutInteger(lp, x); [1]
MLGetInteger(lp, &sum);
printf( "sum = %d\n", sum);
result = sum; [2]
return result; }
You see the error comes from [1] and [2]. Because, in the second argument of MLPutInteger is an Integer while x is DerivType. In [2], the sum is an integer while the result is DerivType. Please help me fix this code. How can I implement this idea. Thank you very much Yours sincerely,
Show More