15,915,328 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 Javascript questions
View Visual Basic 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 Divyanthj123 (Top 5 by date)
Divyanthj123
3-Sep-11 8:34am
View
You mean like a separate file? That's a good idea perhaps I can make the forms application save data to a file and start the console application as a process...the console application can fetch data from the file to execute.
Divyanthj123
3-Sep-11 1:05am
View
I appreciate your elaborate reply. I think the last one was close to what I am looking for. Sorry I am not familiar with the windows API or even visual c++ for that matter, so there's little that I am able to follow. So how about a walkthrough for specifically designing the following app:-
Form1:-
-Two textboxes, one accepts the value of integer "x" and the other accepts integer "y"
-One submit button. The submit button starts the following console program.
//addition.cpp
#include<iostream.h> //or stdio.h
int x;
int y;
int main()
{
int sum;
sum=x+y;
cout << sum; // or printf("%d", sum);
}
I just need to know the following:-
-How to change global variables of addition.cpp from another form so that it can perform its internal operations.
>> I am aware of this because the global variables of one console application can be changed from another console application when they are linked together using #include.
-How to run the console program after the window encounters an event (button_click for example).
Another idea(just throwing it out there):
I am attempting to fetch the values of global variables from an external text file using file structure concepts.
Divyanthj123
2-Sep-11 11:42am
View
In the example program I gave, how about changing the name of the main function to "int addition()", then call the addition() function from the addition.cpp?
Is that possible?
Divyanthj123
2-Sep-11 11:38am
View
You need to use directx for having graphics on a windows gui, which is the reason why I am not porting the console to a window. I am using Allegro libraries, and the best I can do is run the physics simulator on a smaller windowed mode.
All I want out of this app, is to allow the user enter some values so that it uses them in the console application. Previously, the parameters in my console app were initialized at the start of the program. Now, I want the user to set those values.
Divyanthj123
2-Sep-11 7:38am
View
Too generic, and does the opposite of what I want.
I want the form to generate a console, not vice-versa.