Click here to Skip to main content
15,567,415 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Open the file but do not save the args Pin
jeron113-Jan-16 10:18
jeron113-Jan-16 10:18 
GeneralRe: Open the file but do not save the args Pin
honor3us14-Jan-16 1:46
honor3us14-Jan-16 1:46 
SuggestionRe: Open the file but do not save the args Pin
David Crow13-Jan-16 10:33
David Crow13-Jan-16 10:33 
GeneralRe: Open the file but do not save the args Pin
honor3us14-Jan-16 1:56
honor3us14-Jan-16 1:56 
QuestionRe: Open the file but do not save the args Pin
David Crow14-Jan-16 3:33
David Crow14-Jan-16 3:33 
AnswerRe: Open the file but do not save the args Pin
honor3us14-Jan-16 4:51
honor3us14-Jan-16 4:51 
AnswerRe: Open the file but do not save the args Pin
David Crow14-Jan-16 4:52
David Crow14-Jan-16 4:52 
SuggestionRe: Open the file but do not save the args Pin
k505413-Jan-16 12:39
mvek505413-Jan-16 12:39 
This has nothing to do with the solution to your problem, as DavidCrow has already given you a clue. I'm just wondering if your compiler isn't giving you any warnings about your definition of main().

int main(int *op[]) definitely isn't one of the normal ways to define main() Normally it would be one of
C++
int main()
int main(void)
int main(int argc, char *argv[])
int main(int argc, char **argv) 
On some systems you might also be able to use int main(int argc, char *arg[], char *envp[])

Note that as a function parameter char *arg[] and char **arg are equivalent.

You also have a type issues with op. It's declared as int *op[], which is an array of pointer to int, but you are using it as a pointer to int. What you probably want to do is:
C++
int main(void)
{
    ...
    int *op;
    op = (int*)calloc(ct, sizeof *op);
    ...
}

If you're wondering why I used sizeof *op as the second argument to calloc(), consider what might happen if you decide you want to change op from an int to a long, and what might happen if you forget that you need change the call to calloc() too.
GeneralRe: Open the file but do not save the args Pin
honor3us14-Jan-16 1:57
honor3us14-Jan-16 1:57 
GeneralRe: Open the file but do not save the args Pin
k505414-Jan-16 4:52
mvek505414-Jan-16 4:52 
AnswerRe: Open the file but do not save the args Pin
honor3us15-Jan-16 3:44
honor3us15-Jan-16 3:44 
SuggestionRe: Open the file but do not save the args Pin
David Crow15-Jan-16 4:49
David Crow15-Jan-16 4:49 
Questiondoubt in typdef segregation one class in two Pin
narsi8112-Jan-16 19:50
narsi8112-Jan-16 19:50 
SuggestionRe: doubt in typdef segregation one class in two Pin
Jochen Arndt12-Jan-16 21:53
professionalJochen Arndt12-Jan-16 21:53 
QuestionVisual Studio 2016 & MFC Pin
BarryPearlman11-Jan-16 17:54
BarryPearlman11-Jan-16 17:54 
AnswerRe: Visual Studio 2016 & MFC Pin
Jochen Arndt11-Jan-16 21:52
professionalJochen Arndt11-Jan-16 21:52 
QuestionMFC, Cannot disable Menu option from Child View Pin
Member 1120327711-Jan-16 5:30
Member 1120327711-Jan-16 5:30 
AnswerRe: MFC, Cannot disable Menu option from Child View Pin
Richard MacCutchan11-Jan-16 6:59
mveRichard MacCutchan11-Jan-16 6:59 
GeneralRe: MFC, Cannot disable Menu option from Child View Pin
Member 1120327711-Jan-16 8:23
Member 1120327711-Jan-16 8:23 
GeneralRe: MFC, Cannot disable Menu option from Child View Pin
Richard MacCutchan11-Jan-16 22:23
mveRichard MacCutchan11-Jan-16 22:23 
AnswerRe: MFC, Cannot disable Menu option from Child View Pin
Jochen Arndt11-Jan-16 22:30
professionalJochen Arndt11-Jan-16 22:30 
GeneralRe: MFC, Cannot disable Menu option from Child View Pin
Member 1120327712-Jan-16 4:51
Member 1120327712-Jan-16 4:51 
QuestionHow to change a alignment of CStatic Label at run time? Pin
Le@rner9-Jan-16 2:52
Le@rner9-Jan-16 2:52 
AnswerRe: How to change a alignment of CStatic Label at run time? Pin
Richard MacCutchan9-Jan-16 3:46
mveRichard MacCutchan9-Jan-16 3:46 
GeneralRe: How to change a alignment of CStatic Label at run time? Pin
Le@rner10-Jan-16 19:29
Le@rner10-Jan-16 19:29 

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.