|
Hi,
I'm pretty new to programming in C++ (got some PHP/MYSQL exp.).
But I'm trying to make a program now(not important), but I want to check if they registerd their version trough a mysql database.
This is (empty) function that i'm going to use
int user_check(string user_reg, string user_pass, string account_name)<br />
{<br />
if(var4 != "yes")<br />
{<br />
user_checked = 1;<br />
}<br />
return user_checked;<br />
}
So what I want to know is how to make a connection with a database, then get the results from a table(ex. members).
please help me out
(If you include files, give me (a) link(s) where I can get them all)
I'm using Dev-C++ to compile
Thanks in advance
|
|
|
|
|
iLLeLogicaL wrote: I'm using Dev-C++ to compile
Then you are, by definition, not using C++/CLI.
There is no database support in C++, it's all provided by external libraries. Any answers you get in the Visual C++ forum, are likely to be Microsoft Visual Studio centric. You could try there, it's better than asking here, but I'm not confident. Have you tried google ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
http://dev.mysql.com/downloads/connector/
|
|
|
|
|
Yes and it brought me to this post
http://www.codeproject.com/database/mysqlwrap.asp but when I try to compile it always gives the error that mysql.h isn't included. Even when it is in the main program. I copied the whole include map of a mysqlserver (4.1) to the same map where mysqlplus.h is :-/
|
|
|
|
|
Hi everybody.
I wanna write an application which has a database created using SQL-Server2000.
In this app I need to have a beautiful graphical user interface and on the other hand have to be able to work with the data tables in an mfc application that is created with vc 2003.(not .net)
what do you suggest?
i think a web service would help if so, can i write it with .net2.0 using c# and asp.net and use the web service with mfc 1.1?
please help me!!!!!!
Sepehr
|
|
|
|
|
sepehr_vision wrote: .(not .net)
Then why did you ask in this forum ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
ididn't mean to ask in cross...
i thought i may get an answer here because it's a multi language project.vc,xml,asp,.net,sql! ididn't know where to ask!
|
|
|
|
|
Yes, I can see how you may have chosen the C# forum, the C++ forum, the XML forum, the webdev forum or the SQL forum. The C++/CLI forum is about the only one that doesn't fit :P
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hello,
I am programing in c++ but I do not use any namespaces. I would like to learn and use it to be more effective. Where can I found some tutorial or information to begin to understand the real advantage to using name space.
Thank you
AutreChien
|
|
|
|
|
This question suitable for VC++[^] forum.
|
|
|
|
|
Hi all,
I need to read a file having rows like
DATA[DELIM]DATA[DELIM]DATA[END]
DATA[DELIM]DATA[DELIM]DATA[END]
DATA[DELIM]DATA[DELIM]DATA[END]
Is there any ANSI C compliant free source available which can read a text file and can read data between [DELIM] given the index?
thank you
Aamir
Aamir Zia
|
|
|
|
|
aamir.zia wrote: Is there any ANSI C compliant free source available
If there is, it won't be C++/CLI. You're in the wrong forum, even if you were asking for ANSI C++. ANSI C file handling is nasty, if you're doing C++, you should look for a C++ solution. Either way, this forum is for C++/CLI questions. Try the visual C++ forum
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
This is really a 2 in 1 question. Normally (read: never before) I don't handle this aspect of an application, being more involved in the mathematical routines, but this time I am responsible for some of the UI. This includes making an attractive UI (having a progress bar) and a responsive UI (having multiple threads).
I have a Windows form application built on (let's call it) Form1. On that form there is a progress bar, progressBar1. I also have a class (let's call it CMyBigCalculation). Inside this class there is a calculation whose time increases almost exponentially (but not quite). Thus I would like to report the progress of the calculation on the progressBar of Form1. But I am not sure how to expose the percentage progress of the calculation (it's deep within the class). The alternative to somehow exposing the progress (which would be difficult), I suppose, would be to create the progress bar from within the class, but I'm a little hazy on creating controls like this. For example, from within the class, how do I create the progress bar on Form1? If I'm out to lunch here, is there a better solution?
Secondly, I would also like to multi-thread this because during the long calculation the app could easily become unresponsive. Again, since this calculation is embedded within the class should I open the new thread from the class or from the main app (i.e. from the code contained in Form1)?
Any help would be greatly appreciated as I'm a little out of my range of expertise.
Windows with no internet connection is safe, but that's not what Windows was built for.
|
|
|
|
|
Is this used in C++/CLI (Managed C++). I am asking because
CMyBigCalculation this class defenition is lot used in MFC
This is project in C++/CLI
http://users.volja.net/bsaksida/co.zip
For multithreading look in
mainform.h
function tabControl_Selecting
I Didn't tried using Progress Bar. And currently i don't know how. When i will need it i will try it.
|
|
|
|
|
bsaksida wrote: Is this used in C++/CLI (Managed C++). I am asking because
CMyBigCalculation this class defenition is lot used in MFC
Uh, no. I just made the name up for this message....
Windows with no internet connection is safe, but that's not what Windows was built for.
|
|
|
|
|
Create an event that gets fired on regular intervals. In your UI place a listener on the event. Then run your long running class from the thread pool.
In the long running class Fire your event whenever the status should be updated. Remember to use invoke so you don't get an exception when updating the UI.
File Not Found
|
|
|
|
|
Hi All,
I am working on Keyboard hooking.I am trying to change the value of lParam before calling CallNextHookEx() function.. and its value is getting changed but the contents remains same.. Where as if I am able to change wParam. For Eg: if I press any key 'S' and if I want to modify it to 'B' by using wParam its possible.. Can u now please help me in modifying this 'S' to 'B' using lParam?
Regards,
~Nash
|
|
|
|
|
1. Isn't this question appropriate for VC++[^] forum ?
2. Why your nick name is missing ?
3. It is difficult to figure out problem without code, isn't it ?
wrote: For Eg: if I press any key 'S' and if I want to modify it to 'B' by using wParam its possible
No. This sounds weired.
|
|
|
|
|
Bits 16-23 of the lParam are the keyboard scan code (OEM-specific). That's the only part of the
lParam remotely related to changing an S to a B.
Why are you fixated on changing the lParam?
wrote: and its value is getting changed but the contents remains same..
Huh? How does a value get changed but contents stay the same?
|
|
|
|
|
Thanks for your responses. U r absolutely correct that Bits 16-23 contains scancode. If I press character 'A' having scancode (1E), so the contents of lParam and wParam are xx1Exxxx and 'A' respectively. Now I wants to change this 'A' to 'S'. I am doing like this
MSG *msg = (MSG*)lParam;
if(msg->lParam == xx1Exxxx) // if character is 'A'
{
msg->lParam +=1; // this doesnot works
msg->wParam ='S'; // this works
}
Since, 1F is scancode of 'S' if I tries to change it using lParam I am not geeting corrcet results.
Since I read somewhere that we can change scancode to change the character using keyboard filter driver. So why is it so that here if am trying to modify scancode I m not getting desirable results?
Nash
|
|
|
|
|
How about something like this?
LRESULT CALLBACK MyKeyboardProc(int code, WPARAM wParam, LPARAM lParam)
{
if((lParam & 0x00FF0000) == 0x001E0000)
{
lParam &= 0xFF00FFFF;
lParam |= 0x001F0000;
wParam ='S';
}
return ::CallNextHookEx(handle, code, wParam, lParam);
}
|
|
|
|
|
Hi all, im trying to create a function that reads a file. The idea of this is to enter a specific file you'd like to have the program read and list the contents of the file. But if you enter the wrong information the else function will tell you that its a wrong entry.
Here's what i have so far:
<br />
#include <fstream><br />
using namespace std;<br />
<br />
int main(){<br />
char file[]="file.txt";<br />
printf("Enter a file you would like to read: ");<br />
scanf("%s", file);<br />
if(strcmp(file, "file.txt")){<br />
printf("Reading contents of file: %s\n",file);<br />
}<br />
else{<br />
printf("That is not a valid file.\n");<br />
}<br />
<br />
system("pause");<br />
<br />
return 0;<br />
}<br />
It doesnt do what it looks like. and im dying to know what i did wrong. Any suggestions? Thanx in advance!
|
|
|
|
|
This is wrong forum to ask this question. Use VC++ forum instead.
dellthinker wrote: if(strcmp(file, "file.txt")){
printf("Reading contents of file: %s\n",file);
}
you need to modify this to,
if(strcmp(file, "file.txt")== 0){
printf("Reading contents of file: %s\n",file);
}
|
|
|
|
|
i am looking for help in open gl program in c++...anyone here good in that..if there is someone i will post my doubt here..
|
|
|
|
|
Do you want to use .NET, or are you in the wrong forum ? The NeHe tutorials were excellent when I read them.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|