15,300 Posted Topics

Member Avatar for sameer.mastek

I don't know, but your research might start [URL="http://www.tcl.tk/software/tcltk/"]here[/URL].

Member Avatar for Salem
1
217
Member Avatar for seanlo

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 …

Member Avatar for seanlo
1
536
Member Avatar for chunkmartinez

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.

Member Avatar for chunkmartinez
0
159
Member Avatar for kimw

open() function takes a char*, not a std::string. [code] inFile.open(path.c_str()); [/code]

Member Avatar for kimw
1
267
Member Avatar for rxgmoral

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.

Member Avatar for Ancient Dragon
1
124
Member Avatar for Sashar400

lovely code -- but what is your question ? please edit your post to include code tags.

Member Avatar for iamthwee
0
599
Member Avatar for herge

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 …

Member Avatar for WolfPack
1
416
Member Avatar for RichC

>>I was thinking of making the while statement a function and calling it with main Yes, that would be my suggestion too.

Member Avatar for RichC
1
129
Member Avatar for gampalu

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.

Member Avatar for Ancient Dragon
0
2K
Member Avatar for Fabii23

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 …

Member Avatar for WaltP
0
7K
Member Avatar for Killer_Typo

[URL="http://www.cplusplus.com/ref/iostream/fstream/"]Here[/URL] is a link I find a useful reference.

Member Avatar for Killer_Typo
1
388
Member Avatar for stormrider

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 …

Member Avatar for gerbil
0
275
Member Avatar for linq

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.

Member Avatar for Ancient Dragon
1
90
Member Avatar for linq

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 …

Member Avatar for Ancient Dragon
1
123
Member Avatar for Laiq Ahmed

>>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 …

Member Avatar for Ancient Dragon
1
126
Member Avatar for hay_man

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 …

Member Avatar for Micko
1
247
Member Avatar for thomasb1942

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 …

Member Avatar for lasher511
0
82
Member Avatar for linq

If you are going to use MFC then you should have created an MFC program, not a win32 windows program.

Member Avatar for Ancient Dragon
1
98
Member Avatar for leonpwhirl

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, …

Member Avatar for leonpwhirl
1
773
Member Avatar for saravana_ssk

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 …

Member Avatar for Salem
0
102
Member Avatar for complete

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 …

Member Avatar for FireSBurnsmuP
1
180
Member Avatar for yeya

derive the class from CFormView instead of CDialog and MFC will put scroll bars on it and handle them appropriately for you.

Member Avatar for Ancient Dragon
1
98
Member Avatar for Deepak Ram

That is a unix os api function which can be called from C if you are compiling for *inix os. just google "man getpid"

Member Avatar for Ancient Dragon
1
51
Member Avatar for lilprogrammer

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 …

Member Avatar for andor
1
396
Member Avatar for chunkmartinez

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.

Member Avatar for chunkmartinez
0
119
Member Avatar for injetykiranbabu

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.

Member Avatar for Ancient Dragon
0
179
Member Avatar for Ancient Dragon

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 …

Member Avatar for Dani
0
134
Member Avatar for Diode

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 …

Member Avatar for WaltP
1
135
Member Avatar for SOLO13

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 …

Member Avatar for Ancient Dragon
1
111
Member Avatar for bhushanm

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.

Member Avatar for jim mcnamara
1
168
Member Avatar for beginerprograme

>> 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?

Member Avatar for ~s.o.s~
1
133
Member Avatar for Ajay Raj

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.

Member Avatar for Ajay Raj
1
128
Member Avatar for Flay

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.

Member Avatar for Flay
1
99
Member Avatar for wheelz

>>Also, #include "stdafx.h" i not necessary It is with VC++ compilers and have precompiled headers turned on.

Member Avatar for Ancient Dragon
1
104
Member Avatar for imelda

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 …

Member Avatar for rinoa04
0
116
Member Avatar for jan1024188

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.

Member Avatar for jan1024188
0
193
Member Avatar for Akks_3

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.

Member Avatar for Ancient Dragon
1
143
Member Avatar for sameer.mastek

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 …

Member Avatar for ~s.o.s~
1
113
Member Avatar for rxgmoral

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 ) …

Member Avatar for rxgmoral
1
189
Member Avatar for gampalu

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 …

Member Avatar for gampalu
1
121
Member Avatar for linq

>>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.

Member Avatar for Ancient Dragon
1
71
Member Avatar for complete

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 …

Member Avatar for dwks
1
183
Member Avatar for kharri5

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 …

Member Avatar for Ancient Dragon
1
263
Member Avatar for Fabii23

>>*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: …

Member Avatar for Ancient Dragon
1
92
Member Avatar for linq

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).

Member Avatar for Ancient Dragon
1
109
Member Avatar for linq

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 …

Member Avatar for GloriousEremite
0
414
Member Avatar for anksphenomenon

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 …

Member Avatar for anksphenomenon
1
703
Member Avatar for linq

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.

Member Avatar for Ancient Dragon
1
107
Member Avatar for Dani

I'm indifferent to them. They are ok, but not something I find very useful.

Member Avatar for The Dude
0
107
Member Avatar for WolfPack

must be because you are a mod:mrgreen: I don't see that problem.

Member Avatar for Dani
0
148

The End.