Click here to Skip to main content
15,891,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Open the file but do not save the args Pin
jeron113-Jan-16 9:18
jeron113-Jan-16 9:18 
GeneralRe: Open the file but do not save the args Pin
honor3us14-Jan-16 0:46
honor3us14-Jan-16 0:46 
SuggestionRe: Open the file but do not save the args Pin
David Crow13-Jan-16 9:33
David Crow13-Jan-16 9:33 
GeneralRe: Open the file but do not save the args Pin
honor3us14-Jan-16 0:56
honor3us14-Jan-16 0:56 
QuestionRe: Open the file but do not save the args Pin
David Crow14-Jan-16 2:33
David Crow14-Jan-16 2:33 
AnswerRe: Open the file but do not save the args Pin
honor3us14-Jan-16 3:51
honor3us14-Jan-16 3:51 
AnswerRe: Open the file but do not save the args Pin
David Crow14-Jan-16 3:52
David Crow14-Jan-16 3:52 
SuggestionRe: Open the file but do not save the args Pin
k505413-Jan-16 11:39
mvek505413-Jan-16 11: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 0:57
honor3us14-Jan-16 0:57 
GeneralRe: Open the file but do not save the args Pin
k505414-Jan-16 3:52
mvek505414-Jan-16 3:52 
AnswerRe: Open the file but do not save the args Pin
honor3us15-Jan-16 2:44
honor3us15-Jan-16 2:44 
SuggestionRe: Open the file but do not save the args Pin
David Crow15-Jan-16 3:49
David Crow15-Jan-16 3:49 
Questiondoubt in typdef segregation one class in two Pin
narsi8112-Jan-16 18:50
narsi8112-Jan-16 18:50 
SuggestionRe: doubt in typdef segregation one class in two Pin
Jochen Arndt12-Jan-16 20:53
professionalJochen Arndt12-Jan-16 20:53 
QuestionVisual Studio 2016 & MFC Pin
BarryPearlman11-Jan-16 16:54
BarryPearlman11-Jan-16 16:54 
AnswerRe: Visual Studio 2016 & MFC Pin
Jochen Arndt11-Jan-16 20:52
professionalJochen Arndt11-Jan-16 20:52 
QuestionMFC, Cannot disable Menu option from Child View Pin
Member 1120327711-Jan-16 4:30
Member 1120327711-Jan-16 4:30 
AnswerRe: MFC, Cannot disable Menu option from Child View Pin
Richard MacCutchan11-Jan-16 5:59
mveRichard MacCutchan11-Jan-16 5:59 
GeneralRe: MFC, Cannot disable Menu option from Child View Pin
Member 1120327711-Jan-16 7:23
Member 1120327711-Jan-16 7:23 
GeneralRe: MFC, Cannot disable Menu option from Child View Pin
Richard MacCutchan11-Jan-16 21:23
mveRichard MacCutchan11-Jan-16 21:23 
AnswerRe: MFC, Cannot disable Menu option from Child View Pin
Jochen Arndt11-Jan-16 21:30
professionalJochen Arndt11-Jan-16 21:30 
GeneralRe: MFC, Cannot disable Menu option from Child View Pin
Member 1120327712-Jan-16 3:51
Member 1120327712-Jan-16 3:51 
QuestionHow to change a alignment of CStatic Label at run time? Pin
Le@rner9-Jan-16 1:52
Le@rner9-Jan-16 1:52 
AnswerRe: How to change a alignment of CStatic Label at run time? Pin
Richard MacCutchan9-Jan-16 2:46
mveRichard MacCutchan9-Jan-16 2:46 
GeneralRe: How to change a alignment of CStatic Label at run time? Pin
Le@rner10-Jan-16 18:29
Le@rner10-Jan-16 18: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.