|
HELLLLOOOOOOOOOOOOOOOOOOOOOO!!!!! PLEASE........!!!!!!!
|
|
|
|
|
1. don't hurry the guys that can help you, otherwise you'll have to find your answer by yourself.
2. ask the wrong forum
3. DON'T SHOUT !!!
4. be discret when it is your first posts here.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
is there anybody that know how to connect, when i enter matrik no at client side then at the admin side the statistic graph will increase everytime i enter the number. only admin can see this statistic.. please anybody know?
|
|
|
|
|
you are on a Managed C++ forum... ask your question on the right forum, respecting the rules Chris maunder exposes on his posts at the beginning of each forum (you should have a look !!!).
ask this here[^] and please redt this[^] before going further)...
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 3:58 Thursday 24th November, 2005
|
|
|
|
|
I have an application in which i am trying to call some dll imported function that are exported using c++ calling convention. There are couple of function exported using c calling convention. When i import all those function in my application i am able to call functions that are exported using c calling convention but not able to call functions that are exported using c++ calling convention.
any help is greatly appreciated..
thanks, Ramendra
Ramendra K
|
|
|
|
|
Hi All,
I have an issue storing derived class objects and calling their overloaded member functions. To illistrate the problem, picture this:
<br />
class Base<br />
{<br />
public:<br />
virtual void func1 (int i) { cout << i << endl; }<br />
};<br />
<br />
class A : public Base<br />
{<br />
public:<br />
virtual void func1 (int i) { cout << "i - " << i << endl; }<br />
};<br />
<br />
class B : public Base<br />
{<br />
public:<br />
virtual void func1 (int i) { cout << "i : " << i << endl; }<br />
};<br />
<br />
void global_func (Base& B) { B.func1 (1); }<br />
In this e.g. you can send A , B or Base into global_func. Now we want to link A and B together so we create a seq class and overload the operator >>:
<br />
class seq : public Base<br />
{<br />
public:<br />
seq (A _a, B _b) : m_a (_a), m_b (_b) { }<br />
A& m_a;<br />
B& m_b;<br />
void func1 (int i) { m_a.func1 (i); m_b.func1 (i); }<br />
};<br />
<br />
seq operator>> (A& _a, B& _b) { return seq (_a, _b); }<br />
Now we can write objA >> ObjB , to do both func1 in A and B at the same time. We inherit from base, because then we can pass seq in global_func . However linking a whole string together become quite irritating esp. when you use ObjA >> ObjB often.
So this is the problem, how do you store the seq generically (i.e. if there is a sequence that does B before A, but would like to it in the same object).
I thought about using a collect class:
<br />
class collect<br />
{<br />
public:<br />
collect (Base& B) : m_base (b) { }<br />
Base m_base;<br />
void func1 (int i) { m_base.func1 (i); }<br />
};<br />
But when I create the collect and global_func calls func1 , it calls it in Base not seq
Idea's, or have I just missed the plot?
thanks,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
Could any one please let me know what is the use of virtual destructors?
At what point of time we use these virtual destructors?
Nice talking to you.
|
|
|
|
|
Hi,
G Haranadh wrote: Could any one please let me know what is the use of virtual destructors?
Virtual helps with derived classes. If you child class allocs memory and deallocs it in the destructor, then you will always want the child class' destructor to run. If the base class' destructor is not virtual then if the base class detructs it will not call the child class and memory will leak. When it is virtual it will call the child class before the base class.
G Haranadh wrote: At what point of time we use these virtual destructors?
When Objects destruct
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
I have a C++ app that includes a 3rd party library that has a type called
'System'. This class exists in a namespace, let's call it XYZ::System.
Then I am compiling my C++ app with /clr and somehow when VC8 includes
xlocale (which in turn uses a macro defined in yvals.h) that calls a method in .NET (System.bla.bla) there is an ambiguity.
How can I resolve this easily?
|
|
|
|
|
use ::System and XYZ::System instead of just use System
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
Well that might work for my own source code but VC8 includes VC headers that call managed code and make calls to System:: namespace classes. This means I would have to modify all of these Microsoft headers by hand for this to work, which would be impossible to do without causing all sorts of other headaches.
Is there not some way to rename a known .NET namespace to another name? Like rename ::System to ::DotNetSystem ?
|
|
|
|
|
try surrounding your include line with #define and #undef to avoid name collision..
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
If I do something like the following:
#define<br />
#include "XYZ.h"<br />
using namespace XYZ;<br />
#undef
I get the following error:
error C2007: #define syntax
I get that error withour without the using namespace statement as well.
Is that what you meant or was it something else?
|
|
|
|
|
Hi All,
I am new in c++, I want to draw a simple graph between two values using c++, Can anyone help me. ?
Mareo
|
|
|
|
|
|
Guys I also have the algorithm see if this helps! THanx alot!
Input & Output~~~
The user will enter
1 for a triangle
2 for a rectangle
or 0 to quit
Any other number is unacceptable.
Use a loop to force the user to enter a valid value
Use a menu format for a prompt
If the user enters 1 or 2, she should be prompted to read a single character that will be used to create the figure.
any keyboard character may be specified
For a triangle, the user will enter the height of the triangle.
The output is a triangle created with height representing the number of lines on the screen. For example, a height of three would look like:
*
**
***
For rectangles, the user will enter the height and width of the rectangle.
The output is a rectangle created with height representing the number of lines on the screen and the width is the number of characters on each line. For example, a height of three and a width of four would look like:
****
****
****
Main should print the total number of characters used or an error message.
Algorithm~~~~
Create a main program loop controlled by the users response in the next step
Use a menu to ask the user to select 0, 1 or 2 (quit, triangle, rectangle)
Use a call-by-reference utility function to force the user to enter a number between 0 and 2.
If the user said to quit, leave the main loop.
Otherwise
use a call-by-reference function to ask the user to enter a character to be used when displaying the figure.
Use a call-by-reference function to ask the user to enter a height and (for rectangles only) a width.
Call a function that creates the image and returns
the number of characters used to create the image
or, 0 if the image was not created
An error has occured (return 0) if
the height is less than 1 or larger than 20
the width is less than 1 or larger than 40
This function must call another function to create one line of the image
main should check the value returned
Print the number of characters used
say something if an error occurred (zero return value)
|
|
|
|
|
|
Every Body can do that, but they have their ovn application to make. This is soooooo Simple even you can do it. Have you readed any tutorial or any Book on c++. They give you some basic enogh to make that simple app. If you need a tutorial on managed c++ you can finde it
here:
http://www.functionx.com/managedcpp/index.htm[^]
Don't you even know how to start? If you do, then just start and try to program with some brain.
|
|
|
|
|
Guys Iam an amatuer in C++ language. I need help with this program. Please if anybody can help me with it. Please write a code for me. Its a simple program but I dont know how to do it. Please its really important for me to do this stuff! THanks alot!
I have the output to how this program looks and Iam supposed to write a code for this. Please help me out buddies!
Here is the link to this Program output please download it and change the extension to .EXE . THankx alot guys! Waiting for early reply!
LINK~~~~http://www.megaupload.com/?d=6QQALGT9
|
|
|
|
|
Hi, I have a problem validating with a XmlValidatingReader and a .xsd file
the validation breaks when the importDate attribute is parsed
< Info importDate = "1967-08-13" />
in the .xsd is defined as
< xs:attribute name="importDate" type="xs:date" use="required" />
and the error message is
"The 'importDate' attribute has an invalid value accordint to its data type. An error occurred at, (12, 44)"
Anyone has an idea why this happens, when I validate the same XML file in the XMLSpy it works fine, then i run my program and it breaks in that line, if I remove the line then everything works
Thanks in Advance
Isaac B
|
|
|
|
|
hello,
I inherited C/C++ source code with a lot of precompiled defines depending on the product to compile for. A lot of these defines are also nested. So changing the software for one product is difficult as the code is not really readable. Placing the new code between the wrong defines implies wrong functioning of other products afterwards.
Does anyone knows an editor in which I can define which defines are used so that I only see the code that is used ?
stoffel
|
|
|
|
|
How to change CEdit's background color and text color? thanks.
|
|
|
|
|
Hi All,
Thanks in advance.
I am not able retrieve the out parameter values from an SQL Server stored procedure using ADODB::_CommandPtr. It is working fine with Oracle stored procedure.
The code..
ADODB::_ConnectionPtr m_objConn;
ADODB::_CommandPtr m_objCmd;
_variant_t vtEmpty1(DISP_E_PARAMNOTFOUND, VT_ERROR);
_variant_t vtEmpty2(DISP_E_PARAMNOTFOUND, VT_ERROR);
_bstr_t bstrSP("sp_MyTestSP");
_variant_t vtValue;
_variant_t vtName;
m_objConn.CreateInstance( __uuidof( ADODB::Connection ) );
m_objCmd.CreateInstance( __uuidof( ADODB::Command ) );
m_objConn->Open(lpszCnnStr, lpszUserName, lpszPwd, NULL);
m_objCmd->ActiveConnection = m_objConn;
m_objCmd->CommandText = bstrSP;
m_objCmd->CommandType = ADODB::adCmdStoredProc;
m_objCmd->Parameters->Refresh();
m_objCmd->Parameters->Item[_variant_t("@EmpId")]->Value =_variant_t((long)10);
objTable.m_pstRecSet = m_objCmd->Execute(&vtEmpty1, &vtEmpty2, ADODB::adCmdStoredProc);
/*check for the output paramaters*/
for(pp =1; pp < m_objCmd->Parameters->Count; pp++)
{
switch(m_objCmd->Parameters->Item[_variant_t((long)pp)]->GetDirection())
{
case 2:
case 3:
vtName = m_objCmd->Parameters->Item[_variant_t((long)pp)]->GetName();
sprintf(pszDest, "%s=", (LPCSTR)((_bstr_t)vtName));
vtValue = m_objCmd->Parameters->Item[_variant_t((long)pp)]->Value;
if(VT_NULL != vtValue.vt)
sprintf(pszDest, "%s%s", pszDest, (LPCSTR)((_bstr_t)vtValue));
break;
default:
break;
}
}
This code works fine with oracle stored procedures. But i am getting NULL when i use it with SQL Server stored procedures.
What could be the problem? Please help me.
Shyju.
|
|
|
|
|
Hello I am trying to draw a box and a message in a console window like so:
**************
* *
* Hello name *
* *
**************
Instead it looks like this:
**************
* *
* Hello name
* *
**************
This is my code that I am trying to get work:
<br />
int main(int argc, char *argv[])<br />
{int r=1,row=0,col=0,c=1;<br />
string name,greet;<br />
<br />
cout << "Please enter your name";<br />
cin >> name;<br />
greet = " Hello " + name +" ";<br />
<br />
row = 5;<br />
col = greet.size()+2;<br />
<br />
for(r=1;r<6;r++){<br />
for(c=1;c<=col;c++){ <br />
if(c==1 || r==1 || r == 5 || c==col)<br />
cout<< "*";<br />
else if(r==3 && c>1 && c<col-1) {<br />
cout<<greet;c+= greet.size();}<br />
else<br />
cout<<" ";<br />
}<br />
<br />
cout<<endl; }<br />
<br />
system("PAUSE");<br />
return EXIT_SUCCESS;<br />
}<br />
The top one should be a box and the second one should be a box but missing an asterisk right after name.
|
|
|
|
|
You need to change your line
c += greet.size();
to
c += greet.size() - 1;
since you've already advanced to position 1 and you want to only add the size of greet , you must subtract one from greet 's size.
"we must lose precision to make significant
statements about complex systems."
-deKorvin on uncertainty
|
|
|
|