The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> Micro Focus/Compuware QALoad

Pages: 1
PokerPlayer
Member


Reged: 11/29/06
Posts: 40
Loc: NJ, USA
Having Trouble with Include on String
      #682233 - 08/16/11 09:33 AM

I ahave QALOAD 5.9. I want to include <string> library of functions but I am getting compiler errors

code looks something like this -->

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string>

#include "www_visual_commands.h"

// set function to call on abort
void abort_function(PLAYER_INFO *s_info);

#ifndef NULL
#define NULL 0
#endif
extern "C" int rhobot_script(PLAYER_INFO* s_info)
{
// Declare Variables
//

string s;

error returned -->
Tuesday August 16, 2011, 12:25 PM - Compiling: C:\Program Files\Micro Focus\QALoad\Middlewares\WWW\Scripts\testagain.cpp...
Verify Sleep Syntax succeeded. 0 error(s), 0 warning(s).
Verifying Checkpoints.....
Verify Checkpoints succeeded. 0 error(s), 0 warning(s).
Continuing compile...

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

"C:\PROGRA~1\MICROS~2.NET\Vc7\bin\cl" /nologo /MD /W3 /GX /I . @UniversalIncludes.lst /I "C:\PROGRA~1\MICROS~2.NET\Vc7\include" /I "C:\PROGRA~1\MICROF~1\QALoad\WincDev" /c "C:\PROGRA~1\MICROF~1\QALoad\MIDDLE~1\WWW\Scripts\testagain.CPP" -DWIN32 /Fo"C:\PROGRA~1\MICROF~1\QALoad\MIDDLE~1\WWW\Scripts\testagain.OBJ"
testagain.CPP
C:\Program Files\Micro Focus\QALoad\Middlewares\WWW\Scripts\testagain.cpp(80) : error C2065: 'string' : undeclared identifier
C:\Program Files\Micro Focus\QALoad\Middlewares\WWW\Scripts\testagain.cpp(80) : error C2146: syntax error : missing ';' before identifier 's'
C:\Program Files\Micro Focus\QALoad\Middlewares\WWW\Scripts\testagain.cpp(80) : error C2065: 's' : undeclared identifier
NMAKE : fatal error U1077: '"C:\PROGRA~1\MICROS~2.NET\Vc7\bin\cl"' : return code '0x2'
Stop.
The Script compiled with Errors.
Compile failed.

-------------------
If I add the c version #include <string.h> and use functions from there all is good.
Is there something else that needs to happen for the string type to be recognized in QALOAD?


Post Extras: Print Post   Remind Me!   Notify Moderator  
drazle
Active Member


Reged: 11/30/00
Posts: 829
Loc: Michigan, USA
Re: Having Trouble with Include on String [Re: PokerPlayer]
      #682602 - 08/19/11 06:06 AM

I'm confused on what you are trying to include. I don't know of any string functions that you can use without including string.h. Are you trying to include your own functions in a file called "string" that has no suffix?

If you want to use the string class I believe that you have to include string.h.

That said, you shouldn't use the string class in QALoad and are likely to introduce errors. If you need the string functions, then inlcude string.h. But you should only use those on char arrays in QALoad and use CLoadString for the parameters of any QALoad function, or you will most likely have problems.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:  AJ, DSquared 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 2452

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5