15,300 Posted Topics

Member Avatar for Salem

There's a time to smile, and a time to frown. I try to smile all the time while at work as a WalMart cashier and often wear a happy-face sticker on each shirt lapel. I haven't been punched in the face yet for smiling :)

Member Avatar for MosaicFuneral
0
176
Member Avatar for Michael_Tanner

read [URL="http://www.devsource.com/c/a/Using-VS/Calling-Unmanaged-Code-from-Net/"]this article[/URL] Seems to me it would be a whole lot easier to use managed streams. Don't ask me how because I have not done it. Something like [URL="http://www.codeguru.com/columns/dotnettips/article.php/c7143"]this article.[/URL]

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

Has anyone tried to write [URL="http://support.microsoft.com/kb/307398"]this tutorial [/URL]using VC++ 2008 Express? The article claims to be written with VC++ 2005. But I thought 2005 and 2008 used compatible versions of CLR language. I'm getting all kinds of compiler errors -- for example [icode]String* str;[/icode] instead of using [icode]String^ str;[/icode] and …

Member Avatar for Ancient Dragon
0
195
Member Avatar for edenn1

Its the same as any other sort algorithm -- when you need to swap just swap Person pointer in the PersonList structure. It would be a lot easier to convert the linked list to an array of pointers into the linked list, then sort that array.

Member Avatar for Tom Gunn
0
107
Member Avatar for GECKA

>>Is the .exe file deployed or a library is created out of the application for deployment? The exe. Only exe files are run on a Windows operating system -- libraries and DLLs require exe files to run them. Depending on the exe program you may also have to deploy one …

Member Avatar for GECKA
0
81
Member Avatar for Zachster

Learn the c++ language first -- don't jump into the deep end of the pool until you know how to swim. A program like you describe will take a firm grasp of the C or C++ language (could be in other languages as well).

Member Avatar for shadwickman
-1
55
Member Avatar for Flyin dagger

The President is not a miracle worker -- although I think that was one of his campaign promises :) All presidential-hopefuls promise things in their campaigns that they can't possibly fullfill, or that they later decide are unworkable. And I wouldn't be supprised if Obama is the same.

Member Avatar for Aia
0
783
Member Avatar for reyaanhelp

You will learn a great deal more by writing it yourself instead of trying to copy someone else's work.

Member Avatar for Salem
-1
68
Member Avatar for TheSilverFox

pass to function: its just a parameter [code] int foo(int n) { return n*10; } int main() { // This line passes the value 15 to the function foo() // and gets the return value in the variable named x int x = foo(15); } [/code]

Member Avatar for csurfer
1
105
Member Avatar for sknake

You mean like this: Color coding requires the language option in to code tags [code=cplusplus] #include <iostream> int main() { std::cout << "Hello World\n"; } [/code]

Member Avatar for sknake
0
192
Member Avatar for masterofpuppets

>>If you need other pieces of the code I'll post them here... Please don't. Post all your technical questions in one of the language boards. I would move this to the right place if I knew what computer language that code was written in.

Member Avatar for masterofpuppets
0
120
Member Avatar for goody11

What variables do you want initialized? >>SendMessage(hwndListBox, LB_GETTEXT, a, etxt[a]); That's not correct, the last parameter is only passing a single character, not a pointer to a character array. There is how it should be coded [icode]SendMessage(hwndListBox, LB_GETTEXT, a, etxt); [/icode] If you want to keep all the strings in …

Member Avatar for NathanOliver
0
131
Member Avatar for gretty

[URL="http://www.winprog.org/tutorial/"]tutorial[/URL] Lots of good books [URL="http://www.amazon.com/s/ref=nb_ss_gw_1_14?url=search-alias%3Dstripbooks&field-keywords=windows+programming+c%2B%2B&sprefix=windows+progra"]here[/URL]

Member Avatar for Ancient Dragon
0
263
Member Avatar for cooolguy

use the >> operator [code] ifstream in("file.txt"); string word; while( in >> word ) { } [/code]

Member Avatar for cooolguy
0
75
Member Avatar for penguhooks

line 1: should be <iostream> -- no .h extension. If what you are reading tells you to use iostream.h then stop reading it right now and read something else. line 2: delete it. conio.h is non-standard and its use is discouraged in c++ programs. line 5: put that } on …

Member Avatar for Tom Gunn
0
309
Member Avatar for Rodman2009

You didn't mention the compiler you are using, but assuming it is VC++ 2008 (Express) Select menu item Project --> Properties --> expand Configuration Properties --> General. In the pane on the right, the third item from the bottom, change "Character Set" option to "Not Set"

Member Avatar for Nick Evan
0
152
Member Avatar for cplusplusfool

>>I do not know how to use FILE for writing data. Excellent :) Don't use it in c++ programs. Use fstream, ofstream or ifstream objects.

Member Avatar for csurfer
0
148
Member Avatar for lancevo3

assign.cpp calls read_accounts() twice -- why??? line 87: >> strcmp(accountList[i].get_accountNumber(),tranAcct)==0; that should be an if statement -- without the [icode]if[/icode] the loop will not work correctly. [icode]if( strcmp(accountList[i].get_accountNumber(),tranAcct)==0)[/icode]

Member Avatar for lancevo3
0
139
Member Avatar for Cloneminds

I think your formula is incorrect. See [URL="http://geography.about.com/c/ht/00/07/How_Convert_Fahrenheit_Celsius0962932698.htm"]this[/URL] [code] int main() { float f = 82; float c = (f - 32.0F) / 1.8F; cout << "c = " << c << "\n"; } [/code]

Member Avatar for Salem
0
112
Member Avatar for goody11

I compiled the *.cpp file with VC++ 2008 Express and got some errors [quote] 1>c:\dvlp\wintest\wintest\wintest.cpp(23) : error C2440: '=' : cannot convert from 'HGLOBAL' to 'LPSTR' 1> Conversion from 'void*' to pointer to non-'void' requires an explicit cast 1>c:\dvlp\wintest\wintest\wintest.cpp(61) : error C2664: 'SendMessageA' : cannot convert parameter 1 from 'int' …

Member Avatar for goody11
0
289
Member Avatar for mmangai

I believe most programs contain language-specific dlls for each of the languages they wish to support. If its a MS-Windows gui program then put all the resources in language-specific dll.

Member Avatar for mmangai
0
148
Member Avatar for cplusplusfool

Please describe the problem -- what does the code not do correctly? Or are there compiler errors, post some of the errors. And what operating system/compiler are you using?

Member Avatar for cplusplusfool
0
117
Member Avatar for Narue
Member Avatar for lllllIllIlllI
0
698
Member Avatar for dello

[QUOTE=kangarooblood;908242]use the iomanip header [code=c++] cin.width(30); // reads max 30 characters/numbers cin >> input; [/code][/QUOTE] Nope, that doesn't help.

Member Avatar for Sky Diploma
0
360
Member Avatar for jessejamesjjr

You call that c++ code ???:D My suggestion to you is to scrap it and rewrite in true c++ -- a program without all those C style functions calls.

Member Avatar for wildgoose
0
175
Member Avatar for jcwm249

The error message is quite clear -- you failed to code the function named get_record().

Member Avatar for Ancient Dragon
0
152
Member Avatar for jcwm249

line 88 of the code you posted: You can not code a function inside another function. Write that function outside any other function then just call it on line 88.

Member Avatar for Ancient Dragon
1
242
Member Avatar for daviddoria

c++ does not allow initialization of variables like that. No c++ compiler on earth will do it. What you might be referring to is [icode]const int x = 5;[/icode], which is allowed but not implemented by all compilers.

Member Avatar for Ancient Dragon
0
163
Member Avatar for balu naik
Member Avatar for Stefano Mtangoo
0
82
Member Avatar for tag5

[QUOTE=tag5;908098]Look at the link in adatapost's post???[/QUOTE] Yes -- you see those blue letters? That a link, just take your mouse and click on it.

Member Avatar for tux4life
0
126
Member Avatar for VernonDozier

Should work as long as you are logged into MS-Windows with administrative privileges. If not, then the os may prevent you from writing into c:\\ root directory. Try writing that file to another directory that you know is writable.

Member Avatar for VernonDozier
0
117
Member Avatar for Quan Chi2

Its almost impossible to read .xls files directly because they contain proprietary MS-Excel data. But if you really really really have to do it then read [URL="http://sc.openoffice.org/excelfileformat.pdf"]this document[/URL] The simpler solution is to convert the xls files to cvs files using MS-Excell program. The csv files do not contain all …

Member Avatar for Quan Chi2
0
162
Member Avatar for balu naik

Dev-C++ is not really recommended any more because it is no longer being updated and is already several years old. >>i.e. not for beginars. If you want to spend the $$$ for it, then buy a copy of VC++ 2008 Professional. [URL="http://www.embarcadero.com/products/cbuilder/"]Borland C++ Builder [/URL]is also considered pretty good.

Member Avatar for Ancient Dragon
0
162
Member Avatar for mario20055

Its not necessary to test for file existance beforehand. Just open like this: [icode]ios::in | ios::out | ios::ate[/icode]. This will append text to the end of the file every time the program is run. [code] int main(int argc, char* argv[]) { fstream out("HelloWorld.txt", ios::in | ios::out | ios::ate ); if( …

Member Avatar for mario20055
0
2K
Member Avatar for _dragonwolf_

Its not calculating the average score correctly. It should be <sum of all scores> / MAX_SIZE. To do that you need another loop before the one you already have [code] int sum = 0; for(int i = 0; i < MAX_SIZE; i++) sum += scores[i]; average = sum / MAX_SIZE; …

Member Avatar for _dragonwolf_
0
120
Member Avatar for thilinam

line 11 of that code snippet is wrong. It should be delete[], not delete.

Member Avatar for Ancient Dragon
0
162
Member Avatar for member9
Member Avatar for vinito

Welcome to DaniWeb >>Well i have completed my bachelors in IT. Congratulations :)

Member Avatar for happygeek
0
133
Member Avatar for muhandis

what compiler and version are you using? Microsoft has a [URL="http://msdn.microsoft.com/en-us/library/aa716527(VS.60).aspx"]Scribble Tutorial [/URL]that's an introduction to MFC.

Member Avatar for muhandis
0
230
Member Avatar for serkan sendur

I agree we need an MS-Windows programming forum because there are lots of win32 api questions. But in all the time I have been here I don't recall ever having a mobile device question, although I might have missed it.

Member Avatar for serkan sendur
0
195
Member Avatar for joed13k1941

>>Anyone know how to accomplish this task on visual studio with C++? Yes. Do you? Hint: start out the program very simply and prompt for input. When that is done put that in a loop. Compile and correct all errors again. After that, add code to implement the rest of …

Member Avatar for collegetextbook
0
304
Member Avatar for dospy

There is a message in that compile.txt file that states it must be compiled with VC++ 2008 (probably express edition will be ok).

Member Avatar for dospy
0
249
Member Avatar for sgw

Must be some other problem -- your program works perfectly for me using VC++ 2008 Express on Vista Home.

Member Avatar for tux4life
0
172
Member Avatar for digital-ether

>>These files are however *.c and *.h? How do I compile them use a c compiler, such as gcc (*nix) or one of the many c compilers available on ms-windows. Who to use them once compiled? I have not the slightest clue.

Member Avatar for jephthah
0
171
Member Avatar for makymakaru

[QUOTE=makymakaru;906191] another question is.. how will it affect my client.exe? i don't really know what to expect once you run the programs. please explain? [/QUOTE] It won't affect it at all -- just put the blank line at the end of the file like the warning message asked you to …

Member Avatar for tux4life
0
109
Member Avatar for akulkarni

>>for(i=0;i<=d-1;i++) Why not just [icode]i < d[/icode] to avoid subtracting 1 from d on every loop iteration. And it might be better to use another counter intead of all those subtractions. Note also that you don't need the str2 variable. [code] int x; x = strlen(str) - 1; for(i = …

Member Avatar for csurfer
0
8K
Member Avatar for serah1427

[QUOTE=serah1427;906157]hi guys ; i have a code for read txt and later write to sql database but its not working :( can you help me _? [/QUOTE] When you need your car repair do you take it to a garage and tell the repairman "my car is broke, pleas fix …

Member Avatar for Ancient Dragon
0
102
Member Avatar for metzenes

MS-Windows COM programming uses a structure called a VARIANT that might be usefule to you. It has two members: a union of different data types, and an integer that indicates the kind of data was put in the union. It would look like this: [code] struct data { int type; …

Member Avatar for daviddoria
0
106
Member Avatar for chria

>>vector<int> YatzyPlayer::getResults() That function should return a reference to the vector, not a copy of it. [icode]vector<int>& YatzyPlayer::getResults()[/icode] See the reference operator &

Member Avatar for chria
1
119
Member Avatar for amrith92

We have a lot of ghosts here in St Louis -- they even vote every election year :)

Member Avatar for jephthah
1
347

The End.