15,300 Posted Topics
Re: I don't know, but your research might start [URL="http://www.tcl.tk/software/tcltk/"]here[/URL]. | |
Re: since you are going to rewrite the program you might as well use ODBC to make it more generic to any database -- next time the database changes you won't have to change the c code very much. google for "odbc" and you will find lots of c++ classes and … | |
Re: you didn't say what operating system you are using. XP is on a bootable CD, so just insert that CD and reboot your computer. Then reinstall the os on top of the current os. Next time, back up the registry before you start screwing around with it. | |
Re: open() function takes a char*, not a std::string. [code] inFile.open(path.c_str()); [/code] | |
Re: Use [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_ccombobox.asp"]CComboBox's methods[/URL] GetItemDataPtr() and SetItemDataPtr() to attach the structure to an item in the combo box. | |
Re: lovely code -- but what is your question ? please edit your post to include code tags. ![]() | |
Re: Its true most sites have bad examples, and Microsoft is no exception. Your best bet if you are just learning is to study good and reliable text books. Microsoft documentation has greatly improved over the past 10 or so years. Some examples are still questionable, but they have cleaned up … | |
Re: >>I was thinking of making the while statement a function and calling it with main Yes, that would be my suggestion too. | |
Re: And you will probably also have to download the Windows SDK free from Microsoft. That will not be the only porting problem. VC++ 2005 Express is a lot more c++ IOS standards compliant than VC++ 6.0, so that will be a little bit of recoding required. | |
Re: People who post here do it for free -- you should feel privledged to get so many great, free programming tutors here. It is not necessary for you to spam these boards with the same question -- one thread will get attention eventually. Just because someone does not repond within … | |
Re: [URL="http://www.cplusplus.com/ref/iostream/fstream/"]Here[/URL] is a link I find a useful reference. | |
Re: boot.ini file is normally in the c:\ root directory. In Explorer turn on the option to see hidden and system files if you need to, then check the root directory to see if it is there. If it is, send it to Notepad and paste the contents to your respose … | |
Re: It works because CBrush and CPen are derived from class CGdiObject, which has an operator void* that is being called when you leave out the & symbol. So the & symbol in this case is optional. | |
Re: save and restore the original pen value. Some other part of the program may be expecting the pen to be the original value and your program doesn't want to pull the rug out from under it. Your program needs to be a little kinder and a little gentler about other … | |
Re: >>cout<< ((A*)3)->get() << endl; This is using undefined behavor techniques. 3 isprobably not a valid address for an object of type class A. [code] A* pA = new A; // allocate an instance of the class pA->get(); // // and don't forget to deallocate it delete pA; [/code] Another way … | |
Re: the compare() function is not what you need. It only tells you whether one string is the same as the other. you need to check the two strings one character at a time and create a third string that contains the characters which are in both strings. For example, the … | |
Re: safest way is to reformat the hard drive and install everything all over again. You need to back up important files first. If you don't want to do that, then you can just delete the directory that contains the os you do not want, then edit boot.ini file in the … | |
Re: If you are going to use MFC then you should have created an MFC program, not a win32 windows program. | |
Re: A union is just a structure in which all objects occupy the same space. For example [code] union { int a; char buf[20]; float b; double c; } [/code] In the above, the union has only one real object but it can be used by any of the names provided, … | |
Re: Not certain about your question -- can a function declared in one file call a function in another file? Yes, the program has two or more files they all must be linked together into one executable program. How to do that depends on the compiler you are using because every … | |
Re: If you are using VC++ 6.0 compiler the path should already be set. Look in menu Tools --> Options --> Directories -->Include Files. There you will find the path. If it isn't there then you need to put it there. Should have been set during the compiler's install, but maybe … | |
Re: derive the class from CFormView instead of CDialog and MFC will put scroll bars on it and handle them appropriately for you. | |
Re: That is a unix os api function which can be called from C if you are compiling for *inix os. just google "man getpid" | |
Re: you can't just convert the int by typcasting because (1) an int is a non-printable value and (2) the value of the integer may not be in the range '0' to '9' (single digit value). The safest way is to use sprintf() to format the string with an integer. I … | |
Re: the best solution to the problem is to always run a good antivirus program and to not visit risky web sites such as those porn sites. | |
Re: after about a year of intense training in C#, java and html you MIGHT be ready for that interview (entry level job). And don't forget to practice by setting and maintaining your own web site so you have something to show prospective employers what you can do. | |
does anyone review the code shippets that get posted? I was glancing through the list and found one that is full of bugs :eek: -- any newbe would have a difficult time trying to figure out how to correct the bugs. Not a problem for me, but just wondering if … | |
Re: 1. Your program suffers from the same bug that gets() contains -- it will allow you to enter more characters than can be held in the input buffer. The do-while loop needs to check that buffer overflow does not occur. 2. The input buffer is not null-terminated, which might explain … | |
Re: The free Express edition is better for beginners because it doesn't cost anything except download time. Use it for awhile and if you like it you can always buy the Standard or Pro edition. The Express edition does not include some whissles-and-bells that the standard edition includes, but beginners don't … | |
Re: what operating system and compiler? Might be that your program is fragmenting memory very badly or more likely your program is not freeing memory correctly. You might try allocating just one huge block of memory then allocating it among all those nodes. | |
Re: >> cant get the rest to work what parts can you make work? what have you tried? what part(s) of the requirements do you not understand? | |
Re: Suggestion: compile and run the program and you will see for yourself what will happen. Of course just getting it to compile without errors will be your first task. | |
Re: what version of the compiler are you using? Have you installed SP5 bug fixes? I have VC++ 6.0 with [URL="http://www.microsoft.com/downloads/details.aspx?FamilyID=e41b1d62-f3cb-4867-b86a-a2fe4932cf70&DisplayLang=en"]SP 5 [/URL]and do not have your problem. | |
Re: >>Also, #include "stdafx.h" i not necessary It is with VC++ compilers and have precompiled headers turned on. | |
Re: I've been asking that question for the past 20 years and nobody has ever come up with a good solution. There is no one method and some methods work better on some projects then others. First you have to decide what the program is going to do, be as detailed … | |
Re: more than likely you will be using the common gcc compiler. [URL="http://galton.uchicago.edu/~gosset/Compdocs/gcc.html"]Here [/URL]is a short tutorial to get you going. you should also read the sticky threads at the beginning of this board, including[URL="http://web.daniweb.com/techtalkforums/thread50370.html"] this[/URL] one which contains lots of links to other programming articles and tutorials. | |
Re: probably because you can't include that file (wingdi.h) directly in your program. include windows.h instead, and it will include all the necessary header files. | |
Re: one suggestion: load them into a vector, sort them, then use a binary search algorithm to search for given string. But I suspect that is something like what a <map> would do for you. Another suggestion: If the file that contains the 1.5 million records rarely changes, don't read them … | |
Re: try this LPCTSTR lpszStr=(LPCTSTR)Rxg; >>LPCTSTR b=d.Fun(); post the complete error message, I don't think you exported/imported the function correctly. This is a macro I use. When compiling the DLL, define the macro MYEXPORT, when compiling the application then do not define it. [code] #ifdef MYEXPORT #define DllExport __declspec( dllexport ) … | |
Re: you will have to format the string before it is displayed in the dialog box. If you are using MFC, then use CString's Format() method, for exaple [code] CString text; float number = 12.123456; text.Format("%.2f", number); GetDialogItem(IDC_EDI1)->SetWindowText(text); [/code] If you are not using MFC, then use standard C sprintf() function … | |
Re: >>why can I adding them to the case WM_CREATE to realise it? You want to do painting in the WM_CREATE event message? you can't do painting there because the window has not yet been created. | |
Re: linkers do NOT link with *.dll files, but link with *.lib files. What, specifically, is "filename"? Is that something you just made up for posting purposes or is that what the linker actaully put in the error message? >I do not see amy sort of system path in MSCONFIG to … | |
Re: I would use getline() instead of that loop, then parse the line just read [code] std::strine line; while( getline(inp,line) ) { // check line for correct number of commas // count the number of commas -- should be 8 // and make sure the last comma is not the last … | |
Re: >>*node.name = *name; name is declared as a pointer to a character array. *name is extracting just the first character of that array. You should change this line to [code] *node.name = name; // remove the asterisk[/code] >>printf("Employee name: %s\n",*name); the asterisk does not belong here either [code] printf("Employee name: … | |
Re: Those are copyright files and it would be illegal to post them on this web site. Why don't you just reinstall the compiler? Better yet, toss that old compiler out and get VC++ 2005 (Express edition is free). | |
Re: You could do it all in just one callback function, but it might sometimes get a little messy and complicated because the function might have to decide which window it was being called for. Yes, the window handle is passed to the callback function, but that might not be enough … | |
Re: If you intend to support MS-Windows only, C# might be a better language than C++ because it is suppored to have web stuff built into the language. It is M$ answer to Java but right not I think it is only supported in MS-Windows os. I installed Fedora last weekend … | |
Re: InvalidateRect() causes WM_PAINT message. CreateWindow() causes WM_CREATE message. You should not post either of those messages yourself but call the win32 api functions. | |
Re: I'm indifferent to them. They are ok, but not something I find very useful. | |
|
The End.