vc++.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jainchar
    New Member
    • Jan 2009
    • 14

    vc++.net

    hello to every one;
    I have a project in vc++ basically it is a translator software which translate in english to hindi or it translate the office documents like word,excel,powe rpoint.It is developed in visual studio 6.0 and it attached with a database of MS ACCESS which is a base of the project it means the database is a dicitionary for the project.I have two problems in the project:
    1. The project is going fine when it is in windows 98 and having office 2000 and now i am change the environment means i compile the project in visual studio 2008 and having office 2007 and XP and VISTA then it give error and it can't work.If here splited table of word is there than it can't work and it stop and hang.So what should i do or can anybody give me the guideline for it.

    2. The second one probelm is that it give an error C2593:'operator +' is ambiguous in some code line. so how i resolve this error. please help me.The code where this error is come is as follows:

    Code:
    void CAnuvadakView::OnChar(UINT nChar,UINT nRepCnt,UINT nflags)
    {
    .
    .
    .
    .
    if(nChar ==8 || nChar==13)
    {
    if (nChar==8)
    PhoneticStr.Delete(PhoneticStr.GetLength()-1);
    refresh();
    }
    if(nChar >=97 &&nChar<=122 || nChar >=65 && nChar <=90|| nChar ==46)
    {
    PhoneticStr=PhoneticStr+nChar;
    .
    .
    .
    .
    }
    }
    where PhoneticStr is declared in header file as

    extern CString PhoneticStr;

    Please help me to resolve both problems.
    Last edited by Frinavale; Jan 12 '09, 06:56 PM. Reason: Moved to the C++ forum for further help
  • jainchar
    New Member
    • Jan 2009
    • 14

    #2
    vc++

    hello to every one;
    I have a project in vc++ basically it is a translator software which translate in english to hindi or it translate the office documents like word,excel,powe rpoint.It is developed in visual studio 6.0 and it attached with a database of MS ACCESS which is a base of the project it means the database is a dicitionary for the project.I have two problems in the project:
    1. The project is going fine when it is in windows 98 and having office 2000 and now i am change the environment means i compile the project in visual studio 2008 and having office 2007 and XP and VISTA then it give error and it can't work.If here splited table of word is there than it can't work and it stop and hang.So what should i do or can anybody give me the guideline for it.

    2. The second one probelm is that it give an error C2593:'operator +' is ambiguous in some code line. so how i resolve this error. please help me.The code where this error is come is as follows:
    Code:
    void CAnuvadakView::OnChar(UINT nChar,UINT nRepCnt,UINT nflags)
    {
    .
    .
    .
    .
    if(nChar ==8 || nChar==13)
    {
    if (nChar==8)
    PhoneticStr.Delete(PhoneticStr.GetLength()-1);
    refresh();
    }
    if(nChar >=97 &&nChar<=122 || nChar >=65 && nChar <=90|| nChar ==46)
    {
    PhoneticStr=PhoneticStr+nChar;
    .
    .
    .
    .
    }
    }
    where PhoneticStr is declared in header file as
    Code:
    extern CString PhoneticStr;
    Please help me to resolve both problems.
    Last edited by Frinavale; Mar 5 '09, 05:15 PM. Reason: Added [code] tags

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      This code:
      Code:
       
      PhoneticStr=PhoneticStr+nChar;
      is attempting to append a UINT to a CString. Not good. You need to append a TCHAR or a CString&. See the MSDN CString operator+ overloads.

      I have no idea about your Word table other than anything you did in Office 2000 is almost certainly not going to work on Office 2007. Of course, Office itself will convert forward but any code you wrote for the earlier version cannot be guaranteed to work anywhere except on the exact version it was originally written for.

      Comment

      • jainchar
        New Member
        • Jan 2009
        • 14

        #4
        thanx for ur reply
        But can u help me that how i create a splited table of word which was used in my project and my project is MFC based
        Last edited by jainchar; Jan 12 '09, 05:44 AM. Reason: correction

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by jainchar
          1. The project is going fine when it is in windows 98 and having office 2000 and now i am change the environment means i compile the project in visual studio 2008 and having office 2007 and XP and VISTA then it give error and it can't work.If here splited table of word is there than it can't work and it stop and hang.So what should i do or can anybody give me the guideline for it.
          Are you getting any error messages?
          If so, please copy them here so that we can see them.

          Originally posted by jainchar
          2. The second one probelm is that it give an error C2593:'operator +' is ambiguous in some code line. so how i resolve this error. please help me.The code where this error is come is as follows:
          This error will appear if you are using the "+" operator on 2 different objects.
          In your code you are adding a String and an Integer which makes it ambiguous because the compiler doesn't know what to do: do you add the String version of the Integer to the String? or do you add the Integer value of the String to the Integer?


          Be more clear about what you are trying to do by using methods like ToString() if you are using the "+" operator to concatenate the String value to the String...or parse/cast the String into an integer first if you want to add integers.

          -Frinny

          Comment

          • jainchar
            New Member
            • Jan 2009
            • 14

            #6
            reply

            Thanx for reply,

            In 2 problem i m using + operator on 2 different objects.Phoneti cStr is a CString type and nChar is a UINT type.nChar having the ASCII values.accordin g to me this code is using for concatenate the variables. In code of the project in one function PhoneticStr=" ";.So what should i do.

            In 1st problem no errror is generated in the code basically the split function is not there of ms word.so can u give me the code of the split function.

            Comment

            • weaknessforcats
              Recognized Expert Expert
              • Mar 2007
              • 9214

              #7
              You can start by reading the CString overloads for operator+.
              Then you can learn how to use TCHAR as I have already mentioned.

              "What do I do" means your code has to conform to the CString operator+ overloads.

              This site is to answer questions and not to provide code solutions.

              Comment

              Working...