|
|
Hi,
I got a project which is written in VC++ but while compiling its giving me following error in MS-VC 6.0.
"Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
No configuration specified. Defaulting to MyProject - Win32 Debug.
NMAKE : fatal error U1073: don't know how to make '"e:\win32app\microsoft visual studio\vc98\include\basetsd.h"'
Stop.
Error executing NMAKE."
Please let me know which version of MS-VC6.0 will support this. OR do this project have 3rd party libraries. How to supress this NMAKE errors and complie the code successfully.
SNI
|
|
|
|
|
I don't think you can 'make' a header file; check your project settings.
The best things in life are not things.
|
|
|
|
|
SNI wrote: NMAKE : fatal error U1073: don't know how to make '"e:\win32app\microsoft visual studio\vc98\include\basetsd.h"' Stop. Error executing NMAKE." Please let me know which version of MS-VC6.0 will support this.
Have you verified that the file exists?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Thanks for your reply. I was able to resolve this problem but now I am facing following error
".\Release\MyApp.exe : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
Stop.
Error executing NMAKE.
"
Do I need to change NMAKE file for this?
SNI
|
|
|
|
|
Unresolved externals means you're missing source files or libraries. To fix this, you should add the missing files to the command link of the linker (link.exe).
modified 13-Sep-18 21:01pm.
|
|
|
|
|
I tried to identify what is the problem for giving this kind of error and I found that one of function declared object of dialog class as follows
Dlg_Details *pDet = NULL;
and then it creates instance
pDet = new Details_Dlg();
and here it is giving following err
"error LNK2001: unresolved external symbol "public: __thiscall Dlg_Details::Dlg_Details(class CWnd *)"
(??0Dlg_Details@@QAE@PAVCWnd@@@Z)
.\Release\myapp.exe : fatal error LNK1120: 1 unresolved externals"
when i commented out above line of code (creating instance using new) then appln compiles and link properly.
I tried to go to the detail and found that the constructor of above class is declare as
"Dlg_Details(CWnd* pParent = NULL)" in header file and its implementation as in .cpp file is as follows.
"CDlg_Card_Details::CDlg_Card_Details(CWnd* pParent /*=NULL*/)
: CDialog(Dlg_Details::IDD, pParent)
{
//{{AFX_DATA_INIT(Dlg_Details)
....
....
variables are initialized
}
and I tried to changing its declaration in header file as
Dlg_Details(CWnd* pParent)
but still the problem persist. Can you suggest where this code going wrong during linking.
Regds
SNI
Regds
SNI
SNI
modified on Tuesday, July 12, 2011 8:20 AM
|
|
|
|
|
SNI wrote: NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
See here and here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Hi All,
How to convert Chinese VC++ .rc file to English VC++ .rc file.
I have a VC++ project the dialog resource is in Chinese language
I want to convert the Chinese dialog resource to English dialog resource
how to do it?
Is there any tool?
Pls suggest me.
|
|
|
|
|
You could use Google Translate[^] to do this, but it is not guaranteed to be 100% accurate.
You would need somebody to do this by hand.
|
|
|
|
|
I seriously doubt Google translate is accurate with Chinese (although probably worth a try)... I would just about guess doing it by hand is the only viable option.
|
|
|
|
|
If I were doing it, I'd try Google translate, unless you can find someone fluent in both Chinese and English. If you try an automatic translator, like Google, you will surely need to clean up the results so you don't get hilarious or embarrassing text in your resource strings!
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Hi all
i am encrypt my string using base 64,
but sometimes at the end of string the pad char '=' is occur and the Char for index 62 and 63 also non alphnumric.
i want only alphnumbric values.
so is this possible in this case?
is yes please help me how can i do this?
thanks in advance.
waiting for ur valuable suggestions.
|
|
|
|
|
Base64 is a standard encoding so you will have [A-Z], [a-z], [0-9], +, / and = (complément)
This willl make 26 + 26 + 10 + 2 = 64 characters and = is used as a filling.
If the string is to be used say in an URL, then you must do the appropriate encoding to ensure that the string is valid for that purpose.
You cannot have only alphanumeric characters as they allows only 62 possibilities and Base64 encoding is based on encoding 64 possibilities (6 bits at a time).
Philippe Mori
|
|
|
|
|
As Phillipe mentioned, Base64 uses 64 characters and alphanumerics only contains 62 characters, so if you are determined to use Base 64, there is no good way to confine the results to only 62 alphanumeric characters. Sorry about that.
If you aren't too concerned about using the normal Base64 encoding, then you can devise your own encoding scheme or even substitute some other characters, such as @ , _ , $ , etc. for the ones you don't want. Of course that means you'll need to do the substitution on your own, both when encoding and decoding.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Hi,
Have a look at Base32 Encoding[^]. This is what most 'serial number' algorithms use to ensure printable alphanumeric characters.
Best Wishes,
-David Delaune
|
|
|
|
|
Le@rner wrote: i want only alphnumbric values.
First verify that requirement. It would be a very unusual.
But if you really need that then you can't use base 64 because it includes non-alphanumerics.
You could create your own encoding in base32 using a alpha/numeric for the padding but I doubt it is worth it. You can also use hex which isn't space efficient but is easy to produce.
|
|
|
|
|
Hi all,
i m generating a random string,but its give same result when i generate these.
means i generate 5 different string than each and every time these 5 string are same as previously generated.
i am using rand() function for this.
FOU84
GFX7V
GGIK1
JF33K
KEGRV
i want each time generate a new and different string.
please help me for this.
thanks in advance.
modified on Saturday, July 2, 2011 7:23 AM
|
|
|
|
|
The rand() function will always return the same sequence from the same starting point. You should first add a seed to make it start from a truly random point as described here[^].
The best things in life are not things.
|
|
|
|
|
|
Whenever you find a windows function does not do quite what you want it is always best to consult the MSDN[^] documentation first.
The best things in life are not things.
|
|
|
|
|
|
hi, i have C exam next week, so i started solving questions from previous years exams and run into this question, the answer i come up to is far far from having reasonable length, it's too complicated and long , but i can't come up anything shorter.
the question is: write a function that receives an array of letters , and a pointer to final result string that hasn't allocated yet, the function supposed to take the array of letters and count the appearance of every letter and make the final result string look like that:
received array of letters : "abbacdeefg"
result string: "a 2;b 2;c 1;d 1;e 2;f 1;g 1"
in the result it should be alphabetically printed
here is the code that i wrote, it just doesn't makes sense that this is the actual solution:
void sortarray(char str[],char * final)
{
int i = 1,j, extra = 0;
char * letters, *lerrptr;
int * count, * cerrptr;
int size = 0, flag = 0;
letters = (char *) malloc(sizeof(char) * 1);
if(letters == NULL) exit(1);
count = (int *) malloc(sizeof(int) * 1);
if(count == NULL) exit(1);
letters[0] = str[0];
count[0] = 1;
size++;
while(str[i] != 0)
{
flag = 0;
for(j = 0 ; j < size ; j++)
{
if(str[i] == letters[j])
{
count[j]++;
flag = 1;
}
}
if(!flag)
{
flag = 0 ;
size++;
lerrptr = letters;
letters = (char *) realloc(letters,sizeof(char) * size);
if(letters == NULL)
{
free(lerrptr);
free(count);
exit(1);
}
cerrptr = count;
count = (int *) realloc(count,sizeof(int) * size);
if(letters == NULL)
{
free(cerrptr);
free(letters);
exit(1);
}
letters[size-1] = str[i] ;
count[size-1] = 1 ;
}
i++;
}
for(i = 0 ; i < size - 1; i++)
{
for(j = 0 ; j < size - 1 - i ; j++)
{
if(letters[j] < letters[j - 1])
{
letters[j] ^= letters[j+1];
letters[j+1] ^= letters[j];
letters[j] ^= letters[j+1];
count[j] ^= count[j+1];
count[j+1] ^= count[j];
count[j] ^= count[j+1];
}
}
}
for(i = 0 ; i < size ; i++) if(count[i] > 9) extra++;
final = (char *) malloc(sizeof(char) * (size * 4) + extra + 1);
j = 0;
for(i = 0 ; i < size ; i++)
{
final[i*4 + j] = letters[i];
final[i*4 + 1 + j] = ' ';
if(count[i] > 9)
{
final[i*4 + 2 + j] = count[i]/10 + 48;
j++;
final[i*4 + 2 + j] = count[i]%10 + 48 ;
}
else final[i*4 + 2 + j] = count[i] + 48;
final[i*4 + 3 + j] = ';';
}
final[i*4 + j] = 0;
printf(" %s ", final);
}
can anyone help me come up with more reasonable solution?
|
|
|
|
|
It's probably not the shortest possible solution, but to give you an idea maybe:
void sortarray(char str[],char *final)
{
int counter[26] = {0};
int finallength = 0;
int i;
for(i=0;str[i];i++)
counter[str[i]-'a']++;
for(i=0;i<26;i++){
if(counter[i])
finallength += 4;
if(counter[i] > 9)
finallength ++;
}
final = (char*)malloc(finallength+1);
final[0] = 0;
char part[6];
for(i=0;i<26;i++)
if(counter[i]){
sprintf(part,"%c %d;",i+'a',counter[i]);
strcat(final,part);
}
final[finallength-1] = 0;
printf(final);
}
I copied some behaviour from your code which I would like to comment on though:
1. sortarray receives char * final , i.e. a single pointer. While you can use malloc on this, the function which calls sortarray , does not get its pointer to final updated. To solve this, you would need to pass a double pointer (so char **).
2. We're ignoring the case where a letter may occur more than 99 times in a string. It's probably a fair assumption but it's good to be aware of this. 
modified 13-Sep-18 21:01pm.
|
|
|
|
|
thanks a lot, yes i know , the question didn't implied i have to save it, (there is a problem i forgot to free it in the end thou)
and yes i hope the assumption is fair, the question doesn't actually mentions anything about it
|
|
|
|