As shot in the dark, but can I do something like this? and is it efficient?
public boolean isQuote = false;
public int sizeOfFile = GetsizeOfFile( ) ;
// hold the file chars in some array and loop thru it
for(int i=0; i<FileArray[sizeOfFile]; i++)
{
if( FileArray[i] == ' "...
Hi All,
I was wondering if someone could help me with this problem I have. Here is the scenario:
I have developed a Java application which allows users to upload two file types .xls and .csv. The files contain raw data. In a .csv a comma delimeter is used to determine the end of one field and...
Why might I get the following error, and how can it be resolved?
ERROR_BEGIN
Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to MySQL server on 'localhost' (10061) in c:\Inetpub\wwwroot\custlite\html\merged\Connections\connEclipse.php on line 9
Can't connect to MySQL server...
Hi fellow Java coders,
I've got a stand-alone Java app with a input box, and a submit button. I want the submit button to connect to a database (sqlserver) and call a stored procedure passing the value in the input box as a param to it. I have the host ip, db name and store proc name.
Can...
Hi fellow programmers,
I'm using Sergei Kuchins otlv4.h open source library to interface my C++ code with Oracle 9i database. If anyone is familiar with the library or even if anyone knows how to do it another way without the library, can you please help me with giving a SYS_REFCURSOR to an...
Can someone please tell me in what type of a situation a variable of the following type might be used?
typedef void (* pFoo)( void * lpsomeData );
Are there any other ways of achieving the same results? If so, what are the pros and cons of the alternatives?
Thanks in advance.
01001011 01000111
oh no I can't do that because 'this' refers to the String object left of the operator doesn't it?
I'm sorry, I'm not in front of a compiler right now thats why I posted the above before giving it a try first. I've been thinking about it all day and this forum is the only thing I can access to...
Is it ok for me to do this:
String operator+( const String & other)
{
length = this->length + other.length;
const char* s = this->(pStr-1) + other.pStr;
setString(s);
return *this;
}
KG
01001011 01000111
/Per,
I didn't know that! Thanks for that info. But I was just wondering, the syntax suggests that it IS a type-cast. Isn't that line of code essentially just type-casting the pointer? What I mean to ask is, won't the compiler just make whatever is returned by GetFileName() a 64-bit (QWORD)...
LPCTSTR = Long Pointer to a ConsTant STRing.
So you're basically type-casting whatever is returned by GetFileName() to LPCTSTR.
/Per explanation is a better one. I thought I'd just add my two pennies :)
If you like at the end of your program you can do:
arr = 0;
Thats a way of making sure the pointer is 'NULL'ed and put in a nice consistant state before exiting your program.
keyword 'delete' only needs to be used if you use the keyword 'new'.
Hi fellow coders,
I have a problem that I need assistance with.
Consider this class in intset.h:
class CIntSet
{
public:
CIntSet();
~CIntSet();
CIntSet* intersect( CIntSet* is1, CIntSet* is2 );
CIntSet* unionofSets( CIntSet* is1, CIntSet* is2 );
private:
int* intSet;
}...
chippermdw,
i know its modelling, but you didnt understand my question and just jumped into a frenzy of 'representation'. The reason why I asked what i did was from a 'performing a calculation' perspective, which Salem understood and answered for me quite simply and nicely.
I wasnt sure whether...
Fellow coders,
We know that a complex number is a number that is represented as so:
ComplexNumber = realPart + imaginaryPart * squareroot of -1
How can we represent this number in a computer program?
Because the squareroot of -1 is an error.
Kunal.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.