Click here to Skip to main content
15,903,385 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Which IDE is good for programming in C Pin
CPallini3-Aug-14 0:14
mveCPallini3-Aug-14 0:14 
AnswerRe: Which IDE is good for programming in C Pin
«_Superman_»3-Aug-14 3:31
professional«_Superman_»3-Aug-14 3:31 
Questionhow do i make another main.c file where i can call this program and run according to it..? Pin
mybm11-Aug-14 20:31
mybm11-Aug-14 20:31 
AnswerRe: how do i make another main.c file where i can call this program and run according to it..? Pin
Richard MacCutchan1-Aug-14 21:01
mveRichard MacCutchan1-Aug-14 21:01 
GeneralRe: how do i make another main.c file where i can call this program and run according to it..? Pin
mybm11-Aug-14 21:09
mybm11-Aug-14 21:09 
GeneralRe: how do i make another main.c file where i can call this program and run according to it..? Pin
Richard MacCutchan1-Aug-14 21:45
mveRichard MacCutchan1-Aug-14 21:45 
GeneralRe: how do i make another main.c file where i can call this program and run according to it..? Pin
mybm11-Aug-14 23:34
mybm11-Aug-14 23:34 
GeneralRe: how do i make another main.c file where i can call this program and run according to it..? Pin
Richard MacCutchan2-Aug-14 0:41
mveRichard MacCutchan2-Aug-14 0:41 
You don't run anything. Just create a new source file, define your function, by name, parameters and return type. You then use that from another file, either by defining it in the source, or by providing a header file with the definition.
Something like ...
C++
// function.c
# include // your include statements here
double myfunction(int count, double* numbers)
{
    double result = 0.0;

    // your code here

    return result;
}

// main.c
int main()
{
    double myset[] = { 1.0, 2.3, 4.4 };

    extern double myfunction(int count, double* numbers);
    double answer = myfunction(3, myset);
}

GeneralRe: how do i make another main.c file where i can call this program and run according to it..? Pin
mybm12-Aug-14 2:06
mybm12-Aug-14 2:06 
GeneralRe: how do i make another main.c file where i can call this program and run according to it..? Pin
Richard MacCutchan2-Aug-14 2:49
mveRichard MacCutchan2-Aug-14 2:49 
GeneralRe: how do i make another main.c file where i can call this program and run according to it..? Pin
CPallini2-Aug-14 2:59
mveCPallini2-Aug-14 2:59 
GeneralRe: how do i make another main.c file where i can call this program and run according to it..? Pin
Richard MacCutchan2-Aug-14 3:05
mveRichard MacCutchan2-Aug-14 3:05 
AnswerRe: Put the other main in a namespace Pin
Software_Developer2-Aug-14 7:10
Software_Developer2-Aug-14 7:10 
GeneralRe: Put the other main in a namespace Pin
CPallini3-Aug-14 0:20
mveCPallini3-Aug-14 0:20 
QuestionC++ ofstream System.AccessViolation Pin
Kit Fisto1-Aug-14 5:07
Kit Fisto1-Aug-14 5:07 
QuestionRe: C++ ofstream System.AccessViolation Pin
CPallini1-Aug-14 6:11
mveCPallini1-Aug-14 6:11 
AnswerRe: C++ ofstream System.AccessViolation Pin
Kit Fisto1-Aug-14 6:22
Kit Fisto1-Aug-14 6:22 
GeneralRe: C++ ofstream System.AccessViolation Pin
CPallini1-Aug-14 22:05
mveCPallini1-Aug-14 22:05 
AnswerRe: C++ ofstream System.AccessViolation Pin
Kit Fisto4-Aug-14 23:49
Kit Fisto4-Aug-14 23:49 
AnswerRe: C++ ofstream System.AccessViolation Pin
Member 138550171-Jun-18 13:43
Member 138550171-Jun-18 13:43 
QuestionHow can I display Japanese characters in an application ? Pin
Swap930-Jul-14 23:12
Swap930-Jul-14 23:12 
QuestionRe: How can I display Japanese characters in an application ? Pin
Richard MacCutchan30-Jul-14 23:42
mveRichard MacCutchan30-Jul-14 23:42 
AnswerRe: How can I display Japanese characters in an application ? Pin
Swap930-Jul-14 23:53
Swap930-Jul-14 23:53 
QuestionImport CSV to Access DB. Pin
Member 1093049930-Jul-14 8:25
Member 1093049930-Jul-14 8:25 
AnswerRe: Import CSV to Access DB. Pin
Richard MacCutchan30-Jul-14 20:31
mveRichard MacCutchan30-Jul-14 20:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.