Click here to Skip to main content
14,575,257 members

C / C++ / MFC

 
AnswerRe: Open the file but do not save the args Pin
jeron113-Jan-16 9:18
Memberjeron113-Jan-16 9:18 
GeneralRe: Open the file but do not save the args Pin
honor3us14-Jan-16 0:46
Memberhonor3us14-Jan-16 0:46 
SuggestionRe: Open the file but do not save the args Pin
David Crow13-Jan-16 9:33
MemberDavid Crow13-Jan-16 9:33 
GeneralRe: Open the file but do not save the args Pin
honor3us14-Jan-16 0:56
Memberhonor3us14-Jan-16 0:56 
QuestionRe: Open the file but do not save the args Pin
David Crow14-Jan-16 2:33
MemberDavid Crow14-Jan-16 2:33 
AnswerRe: Open the file but do not save the args Pin
honor3us14-Jan-16 3:51
Memberhonor3us14-Jan-16 3:51 
AnswerRe: Open the file but do not save the args Pin
David Crow14-Jan-16 3:52
MemberDavid 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
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:
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
Memberhonor3us14-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
Memberhonor3us15-Jan-16 2:44 
SuggestionRe: Open the file but do not save the args Pin
David Crow15-Jan-16 3:49
MemberDavid Crow15-Jan-16 3:49 
Questiondoubt in typdef segregation one class in two Pin
narsi8112-Jan-16 18:50
Membernarsi8112-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
MemberBarryPearlman11-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
MemberMember 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
MemberMember 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
MemberMember 1120327712-Jan-16 3:51 
QuestionHow to change a alignment of CStatic Label at run time? Pin
Le@rner9-Jan-16 1:52
MemberLe@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
MemberLe@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.