help in C++ Visual studio 2005

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2009
Posts: 11
Reputation: selsium has a little shameless behaviour in the past 
Solved Threads: 0
selsium selsium is offline Offline
Newbie Poster

help in C++ Visual studio 2005

 
0
  #1
Jul 17th, 2009
I am getting the below errors when I build the file in Visual studio, How can I resolve these errors? anyone can help me?

Error 1 error C2660: 'strcpy' : function does not take 3 arguments 129
Error 2 error C2732: linkage specification contradicts earlier specification for 'pro_str_to_wstr' 1405
Error 3 error C2732: linkage specification contradicts earlier specification for 'pro_wstr_to_str' 1412
Error 4 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 443
Error 5 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 446
Error 6 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 493
Error 7 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 532
Error 8 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 538
Error 9 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 658
Error 10 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 675
Error 11 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 700
Error 12 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 728
Error 13 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 835
Error 14 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 863
Error 15 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 890
Error 16 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 895
Error 17 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 925
Error 18 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 938
Error 19 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 954
Error 20 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 965
Error 21 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 977
Error 22 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 987
Error 23 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1009
Error 24 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1078
Error 25 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1168
Error 26 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1206
Error 27 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1267
Error 28 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1308
Error 29 error C2660: 'ProMessageDisplay' : function does not take 4 arguments 1388
Error 30 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1397
Error 31 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1475
Error 32 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1477
Error 33 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1555
Error 34 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1597
Error 35 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 1688
Error 36 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 1991
Error 37 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2266
Error 38 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2379
Error 39 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2392
Error 40 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2433
Error 41 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2525
Error 42 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2753
Error 43 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2779
Error 44 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2838
Error 45 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2871
Error 46 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2886
Error 47 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2912
Error 48 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2927
Error 49 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2951
Error 50 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2962
Error 51 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 2986
Error 52 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3008
Error 53 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3054
Error 54 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3096
Error 55 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3184
Error 56 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3258
Error 57 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3439
Error 58 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3464
Error 59 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3555
Error 60 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3564
Error 61 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3571
Error 62 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3646
Error 63 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3657
Error 64 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3731
Error 65 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3781
Error 66 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3782
Error 67 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3793
Error 68 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3794
Error 69 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3826
Error 70 error C2660: 'ProMessageDisplay' : function does not take 2 arguments 3871
Error 71 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 3978
Error 72 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4274
Error 73 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4282
Error 74 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4286
Error 75 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4292
Error 76 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4369
Error 77 error C2660: 'ProMessageDisplay' : function does not take 3 arguments 4380
|Selva|
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: help in C++ Visual studio 2005

 
2
  #2
Jul 17th, 2009
I think, and I say this cautiously because I'm not too sure, as your error log is quite ambiguous.

But is there a problem with the number of arguments you are passing?
Last edited by iamthwee; Jul 17th, 2009 at 7:34 am.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 11
Reputation: selsium has a little shameless behaviour in the past 
Solved Threads: 0
selsium selsium is offline Offline
Newbie Poster

how to solve these c++ errors? please help me

 
0
  #3
Jul 17th, 2009
Hey folks,

I am getting the below errors when I compile my main.cpp file,

I am new to this Studio2005 environment


Error 1 error C2660: 'strcpy' : function does not take 3 arguments

Error 2 error C2732: linkage specification contradicts earlier specification for 'pro_str_to_wstr'
Error 3 error C2732: linkage specification contradicts earlier specification for 'pro_wstr_to_str'
Error 4 error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Error 5 error C2660: 'ProMessageDisplay' : function does not take 3 arguments
Last edited by selsium; Jul 17th, 2009 at 10:24 am.
|Selva|
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,847
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 298
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Roasting Maven

Re: how to solve these c++ errors? please help me

 
0
  #4
Jul 17th, 2009
What's the purpose of this post?
Did you think: "hey, let's ask my question in an even more stupid way and maybe someone will answer it this time"

Why didn't you take Iamthwee's advice and check if strcpy() indeed had too many parameters? (as the compiler is telling you)
Last edited by niek_e; Jul 17th, 2009 at 10:07 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 11
Reputation: selsium has a little shameless behaviour in the past 
Solved Threads: 0
selsium selsium is offline Offline
Newbie Poster

C warnings

 
0
  #5
Jul 17th, 2009
hi folks,

I am compiling my c program in visual studio 2005 and am getting the below warnings,could anyone help me?

Warning 2 warning C4090: 'function' : different 'const' qualifiers
Warning 4 warning C4090: 'function' : different 'const' qualifiers
|Selva|
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,407
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1467
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: help in C++ Visual studio 2005

 
0
  #6
Jul 17th, 2009
No, we can't help you because we can't see your program. The warning/error messages give you the line number in your program, all you have to do is go to that line and see the problem.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 11
Reputation: selsium has a little shameless behaviour in the past 
Solved Threads: 0
selsium selsium is offline Offline
Newbie Poster

Re: help in C++ Visual studio 2005

 
0
  #7
Jul 17th, 2009
  1. if (line_num > 1)
  2. {
  3. qsort(statistic, line_num+1, sizeof(TestStatistic),
  4. (int (*)(PRO_CONST_ARG void *, PRO_CONST_ARG void *))
  5. ProTestStatisticCmp);
  6. }
this is my code
Last edited by Ancient Dragon; Jul 17th, 2009 at 10:50 am. Reason: add code tags
|Selva|
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,407
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1467
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: help in C++ Visual studio 2005

 
0
  #8
Jul 17th, 2009
The third parameter is wrong. The parameter is a function pointer to your comparison function
  1. int compare(const void *p1, const void* p2)
  2. {
  3. // assume the two pointers are really integers
  4. int* i1 = (int *)p1;
  5. int* i2 = (int *)p2;
  6. return *i1 - *i2;
  7.  
  8. // This would also work
  9. return *(int *)p1 - *(int *)p2;
  10. }
  11.  
  12.  
  13. ...
  14. qsort(statistic, line_num+1, sizeof(TestStatistic), compare);
Last edited by Ancient Dragon; Jul 17th, 2009 at 10:58 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC