|
I don't know, but even if there is they won't let you use it to send spam.
led mike
|
|
|
|
|
But how does PHP mail function work?Where does it send messages?
|
|
|
|
|
Ok. I found out, that I have to send the e-mail directly to the recipients SMTP server.Searched all the internet,but didn't find any information.How to do that with sockets(i am using winsock)?If it's not possible with sockets than how is it possible?
|
|
|
|
|
Of course it is possible with sockets. If you are developing a C++/CLI project then use the .NET SMTP class, it would be much simpler.
System.Web.Mail
led mike
|
|
|
|
|
Ok.I made a program,which sends e-mail through SMTP server? But I have to create an SMTP server to send it (or use my ISP's SMTP server).I don't like it since my program will be used by other computers.But I heard, that it is possible to integrate an SMTP engine in a program.How can I make one? I searched the internet,but didn't find anything.
|
|
|
|
|
elvman wrote: Hi! I made a program,that sends mail to a given e-mail address.
If the user is "giving" the email address then they can "give" the SMTP address as well. I don't see a problem here.
led mike
|
|
|
|
|
Yeah, but users don't even know what's the IP. How the hell could they know whats an SMTP server? I need a tutorial on SMTP engines.Please help!
|
|
|
|
|
I have following piece of code, which works in VC7 but not in VC6. Don't know what's the problem.
A.h
----
class A
{
private:
template[int N] //using sqare brackets as somehow while posting it ignores '<'
class B {
public:
B() {}
class C
{
public:
C() {}
C* GetSomething() const;
}; //end class C
}; //end class B
};//end class A
A.cpp
------
template[int N]
typename A::B[N]::C*
A::B[N]::C::GetSomething() {}
RP
|
|
|
|
|
Repost the code and tick on the "Ignore HTML..." tick box so it renders properly and also post the error message(s) you are getting from the compiler/linker
Also, it might be better to post in the C++/MFC section as your problem is not C++/CLI related
|
|
|
|
|
I think what you are trying to do is not supported in VC++ 6.
George
-- modified at 20:12 Thursday 9th November, 2006
|
|
|
|
|
OK, before I get started I need to point out that I have never coded anything in Managed C++ before so what I am about to ask may seem as simple as drinking water to you, however to me it seems like moving mountains
I need to convert a comma delimited String* into a UNICODE PTCHAR array, so far my code looks something like the following:
<br />
Char splitChar[] = {','};<br />
String* split[] = searchReturnFields->Split(splitChar);<br />
<br />
char* returnFields[1024];<br />
for(int n=0; n<1024; n++)<br />
{<br />
returnFields[n] = NULL;<br />
}<br />
<br />
System::Collections::IEnumerator* myEnum = split->GetEnumerator();<br />
int enumPos = 0;<br />
while (myEnum->MoveNext())<br />
{<br />
String* field = __try_cast<String*>(myEnum->Current);<br />
returnFields[enumPos] = (char*)(void*)Marshal::StringToHGlobalAnsi(field);<br />
enumPos++;<br />
}<br />
Now assuming my input (searchReturnFields) is "val1,val2,val3" this code seems to partially work. I end up with an array that looks something like this:
<br />
[0] 0x0023a878 "x¨#" char*<br />
[1] 0x0023a858 "val2" char*<br />
[2] 0x0023a868 "val3" char*<br />
[3] 0x00000000 null<br />
[4] 0x00000000 null<br />
..<br />
..<br />
[1023] 0x00000000 null<br />
As you can see array position 0 contains, using the technical term, weirdy characters. However it should contain "val1".
So the question is what is going wrong here??
Also, why can I not do the following:
<br />
....<br />
String* split[] = searchReturnFields->Split(splitChar);<br />
<br />
char* returnFields[split->Length];<br />
....<br />
or
<br />
....<br />
String* split[] = searchReturnFields->Split(splitChar);<br />
int arrSize = split->Length;<br />
char* returnFields[arrSize];<br />
....<br />
From what I have managed to work out I have to give the array initialisation a constant int value
|
|
|
|
|
MrEyes wrote: I have never coded anything in Managed C++
MrEyes wrote: From what I have managed to work out I have to give the array initialisation a constant int value
So you are not experienced in C++? Why are you doing this project?
led mike
|
|
|
|
|
Thank for the information, hopefully with that I will find a working solution
|
|
|
|
|
MrEyes wrote: Thank for the information
Umm those were "questions" intended on understanding what level of help you require.
led mike
|
|
|
|
|
I have to work with xml files but i am new with that.
so i want to know how can i perform read and write operation with xml file.
if any body have idea about the same please share with me.
thanks & regards
bankey.
|
|
|
|
|
The XmlDocument class represents the DOM ( Document Object Model ), used to read, write and manipulate XML files. XPATH is the thing you need to google and learn about, if you want to search for nodes in your file.
|
|
|
|
|
|
In C Language how can we do the following..
conversion of the (int) to char
conversion of the (int) to (unsigned char) ------------interger to unsigned char
conversion of the (int) to (unsigned char *) ----------------interger to unsigned char pointer
Thanks..
|
|
|
|
|
Do you mean C, or C++ ? Did you mean to ask in the managed C++ forum ?
int to char happens by itself, it is implicit.
int to unsigned char should also occur, but can also be cast.
you can't convert an int to an unsigned char *, you need to use the & to get the address of the int.
|
|
|
|
|
Thx.. In C language.Actually i m pretty new. if we have
int i;
unsigned char j;
unsigned char *k;
then how can we do that..
|
|
|
|
|
OK. You're totally in the wrong place, this is the C++/CLI forum. The Visual C++ forum is the place for this.
int i = 0;
unsigned char j = i; // I think this will work, if not, then unsigned char j = (unsigned char)i; will
unsigned char * k = &j; // Now, j and k are the same thing, changing one will also change the other, as they are the same variable.
|
|
|
|
|
I have something like this
char **name;
name = new char*[3];
for(int i=0;i<3;i++)
{
name[i] = new char[256];
}
now how to delete name for no memory leaks
can anybody help me
thanks
abhi
|
|
|
|
|
I believe its:
<br />
delete [] name;<br />
since you dynamically created an array of char pointers.
Also, you will also have to delete each created char[256] beforehand.
<br />
for (int i; i < 3; ++i)<br />
{<br />
delete [] name[i];<br />
}<br />
<br />
delete [] name;<br />
Geo
-- modified at 6:03 Thursday 9th November, 2006
|
|
|
|
|
if I have something like this
void foo
{
char **name;
name = new char*[3];
for(int i=0;i<3;i++)
{
name[i] = new char[256];
}
}
and iam creating three objects of foo like foo foo1[3];
is the following is code?
for(int j =0;j<3;j++)
{
for (int i; i < 3; ++i)
{
delete [j] name[i];
}
delete [j] name;
}
if not then how to delete name
help me
thanks
abhi
abhi
|
|
|
|
|
First of all, foo looks like a function and not a class. So, you may need to find a good C++ Primer.
Memory management, especially with pointer-to-pointers, requires the programmer's special attention. Unless you are coding some performance critical code, STL would be a better route to go than to write "error prone" code with a limited knowledge of pointers and dynamic memory allocation.
See: http://www.codeproject.com/cpp/PointerArticle.asp[^]
void foo()
{
char **name;
name = new char*[3];
<br>
for (int i = 0; i < 3; ++i)
{
name[i] = new char[256];
}
<br>
<br>
for (int i = 0; i < 3; ++i)
{
delete [] name[i];
}
<br>
delete [] name;
}
Your code:
abhiramsss wrote:
if I have something like this
void foo
{
char **name;
name = new char*[3];
<br>
for(int i = 0; i < 3; i++)
{
name[i] = new char[256];
}
}
and iam creating three objects of foo like foo foo1[3];
is the following is code?
for(int j =0; j < 3; j++)
{
for (int i; i < 3; ++i)
{
delete [j] name[i];
}
<br>
delete [j] name;
}
if not then how to delete name
-- modified at 22:18 Thursday 9th November, 2006
|
|
|
|