15,300 Posted Topics

Member Avatar for lss123

I tried it with both VC++ 2008 Express and Code::Blocks 8.02 on Vista Home Premium. No problems or errors. With both compilers I first created a project and compiled for debug. This is what Code::Blocks console window [quote] Hello world! Process returned 0 (0x0) execution time : 0.040 s Press …

Member Avatar for JamesPhillips
0
702
Member Avatar for emanfman

c++/CLR String class is not the same as c++ string class declared in <string> header file. Look up [URL="http://msdn.microsoft.com/en-us/library/system.string.aspx"]system::String[/URL] class and review its methods You can not use <string> in CLR/C++ programs, so you might as well delete that header file. Example: [code] using namespace System; int main(array<System::String ^> ^args) …

Member Avatar for emanfman
0
148
Member Avatar for alice_k

you forgot to make pointer b point to anything. [icode]struct s* b = &a;[/icode]

Member Avatar for Moschops
0
723
Member Avatar for yongj

The parameter to FindFirstFile() is wrong. If you want to find all the files in c:\\MyDir *.c then use that as the parameter to FindFirstFile. Note: The code below has not been compiled or tested. This is supposed to concantinate all the command-line parameters to make a single path statement. …

Member Avatar for Ancient Dragon
0
159
Member Avatar for tkdlady

It's called Token Concantination. See[URL="http://en.wikipedia.org/wiki/C_preprocessor"] this wiki article[/URL] about preprocessor directives. Scroll down until you find the section titled "Token concatenation". [Edit] Oops! Didn't see your answer Narue.

Member Avatar for tkdlady
0
174
Member Avatar for CoilFyzx

Sending data to a laser printer is very complicated. You could use win32 api printer functions, such as EnumPrinters() and OpenPrinter().

Member Avatar for Ancient Dragon
0
613
Member Avatar for sha11e

>> Is c++ useful? Naw -- that's why there are millions of programs written in c++.

Member Avatar for sergent
0
213
Member Avatar for sha11e

sounds like you are talking about MS-Windows. dlls "and crap" are used to make the exe files smaller. If you have two *.exe that each use function foo() then put function foo() in a dll so that all *.exe programs can use them. dlls are libraries of pre-compiled code that …

Member Avatar for nezachem
0
180
Member Avatar for msrox

Text is probably declared private in Form1. In Form1 write a public get and put functions to expose Text to the public.

Member Avatar for Ancient Dragon
0
427
Member Avatar for msrox

search [url]www.codeproject.com[/url]. It has probably the largest repository of C++ and MFC code available on the net. If there is such a control, then they will have it.

Member Avatar for msrox
0
114
Member Avatar for loafie55

When is your assignment due? You will need to know about input/output functions like cin and cout, as well as arrays and optionally structures. You will need some way to hold the name of the item ordered and quantity of each item. You can do that with either two arrays …

Member Avatar for loafie55
0
3K
Member Avatar for cse.avinash

>>x="%d";main(b,a,t) Huh? Don't know what that is. >> for(scanf(x,&a);a>0;a=0) Odd loop -- assuming a starts out to be greater than 0, the loop will execute exactly one time. Don't you want to change "a=0" to a-- ? I would assume the code also has to compile cleanly ( 0 errors …

Member Avatar for cse.avinash
-1
553
Member Avatar for tomato.pgn

You could just turn off all those emails so that you don't get them any more. There are options in your profile to do that.

Member Avatar for tomato.pgn
0
199
Member Avatar for asadaziz

There are os specific functions to get a list of file names in a folder. MS-Windows: FindFirstFile() and FindNextFile() *nix: opendir() and readdir() google for those function nanes and you will find out how to use them. I've posted a [URL="http://www.daniweb.com/forums/search.php?searchid=16559526"]couple code snippets here[/URL] to show how to use them …

Member Avatar for asadaziz
0
377
Member Avatar for sergent

If you are just starting to learn assembly then those books for 32-bit systems will also work on 64-bit systems. Err -- I mean that it won't matter whether you use 32 or 64-bit computers. I first learned assembly during the late 1980s by reading a book by Peter Norton.

Member Avatar for GunnerInc
0
140
Member Avatar for jithuvsjithu

[QUOTE=Soubhik;1542149]I'm interested in graphics programming. what library do I use for graphics programming in C if graphics.h is deprecated??[/QUOTE] On MS-Windows use a modern compiler such as VC++ 2010 and win32 api graphics functions. c++ gives you many more options.

Member Avatar for Soubhik
-1
181
Member Avatar for KazenoZ

call win32 api function [URL="http://msdn.microsoft.com/en-us/library/ms633497(v=vs.85).aspx"]EnumWindows[/URL](). For each window M$ will call your callback function with the handle of a window. In that callback function call [URL="http://msdn.microsoft.com/en-us/library/ms633520(v=vs.85).aspx"]GetWindowText[/URL](). Then all you have to do is strcmp() the returned text with that name. If its the window you want then send it a …

Member Avatar for sergent
0
194
Member Avatar for royng

Student life hell???? HaHaHaHa. Wait until you have to actually work for a living. Your time in college is only the bare beginning.

Member Avatar for HiHe
0
565
Member Avatar for sergent

[URL="http://msdn.microsoft.com/en-us/library/aa376868(v=vs.85).aspx"]ExitWindowsEx()[/URL]

Member Avatar for sergent
0
80
Member Avatar for murnesty

Your teacher is correct. You do not put executable code in header files (there are a few exceptions) because the code gets duplicated in each *.cpp file in which the header file is included. Lets say you have two *.cpp files, and each one of those includes the header file. …

Member Avatar for Ancient Dragon
0
152
Member Avatar for bops

did you read [URL="http://technet.microsoft.com/en-us/library/bb457065.aspx"]this[/URL] ? Or research [URL="http://www.google.com/search?hl=en&q=windows%27+EFS+&btnG=Google+Search"]these google links [/URL]?

Member Avatar for grehe
0
481
Member Avatar for pengkeanh

instead of swap() use erase() e.g. [icode]my_map.erase(my_map.begin(),my_map.end());[/icode] Then you can delete lines 15-18 of the code snippet you posed.

Member Avatar for Aranarth
0
290
Member Avatar for Wakesta

what compiler are you using? Many old c++ compilers use now-deprecated iostream.h

Member Avatar for Wakesta
0
208
Member Avatar for deeer

Your first suggestion is not workable because as previously explained the first letter can be one of several commands. But your second suggestion is the best way to write the program.

Member Avatar for Ancient Dragon
0
122
Member Avatar for abelLazm
Member Avatar for Ancient Dragon
0
90
Member Avatar for jingda

I was always heavly addicted to tobacco until I quit about 10 years ago. Quality of life has greatly improved since then.

Member Avatar for ChengYi
0
138
Member Avatar for rannamaa

post declaration of nameList. If it's std::string namelist[size] then there will never be a NULL entry.

Member Avatar for rannamaa
0
117
Member Avatar for c++lover

[URL="http://www.google.com/search?source=ig&hl=en&rlz=1G1GGLQ_ENUS397&q=how+to+write+tsr+in+c&aq=0&aqi=g1g-v1&aql=&oq=how+to+write+tsr+"]Here [/URL]are a few google links that can probably help you. If your computer is running MS-DOS Version 6.3 or earlier then TSRs should be ok. It's not likely they will run under either Vista or Windows 7 command prompts.

Member Avatar for chrjs
-1
176
Member Avatar for cse.avinash

Its horribly recursive -- and illegal by today's C standards. But the code is using long-obsolete original K&R syntax.

Member Avatar for chhabraamit
0
122
Member Avatar for yongj

On MS-Windows use [URL="http://msdn.microsoft.com/en-us/library/aa364418(v=vs.85).aspx"]FindFirstFile[/URL]() and FindNextFile(). [URL="http://www.daniweb.com/software-development/cpp/code/216612"]Here [/URL]is a more extensive c++ example.

Member Avatar for Ancient Dragon
0
164
Member Avatar for chester1908

You wouldn't have any of those problems if you used VC++ 2010 (the Express edition is free). Code::Blocks is also an excellent IDE that has option to install MinGW compiler. I never used Eclipse so I don't know how to resolve your problems with it. I assume you are working …

Member Avatar for yashsaxena
0
203
Member Avatar for axn

remove the -ansi flag and you won't get those warnings. The only reason I know of to use -ansi it to compile old lagecy code, written last century.

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

Just copying the lib files into your project directory doesn't solve a thing. You have to add the lib names to the project settings. Its been a long time since I used that version of the compiler and don't recall how to do that.

Member Avatar for kumarmpk4u
1
324
Member Avatar for smrati.katiyar
Member Avatar for sc8515

I compiled it with VC++ 2010 Express and got no such warnings or errors. Are you sure you are compiling this as C program instead of C++. With vc++2010 *.cpp files are compiled as c++, not C. Change the file extension to *.c and recompile. >>Vector is a C collection …

Member Avatar for Ancient Dragon
0
426
Member Avatar for zslgreen

what do you mean by that??:S You need to explain your question in more detail

Member Avatar for tkud
0
80
Member Avatar for caut_baia

nezachem is correct -- you have to allocate memory for the value using new. If that didn't work, then post your new code. You must set DataSize = number of bytes in Value before calling RegQueryValueEx(). assert() only works when you compile the program for debug. It does nothing at …

Member Avatar for Ancient Dragon
0
273
Member Avatar for kumarmpk4u

Microsoft does not directly support a grid control that is editable. To solve that problem I have used [URL="http://www.codeproject.com/KB/library/gridprojects.aspx"]this grid control[/URL] very successfully. For your project you will have to use either ODBC or ADO (depending on the databas you want to use) to do the queries and get the …

Member Avatar for Ancient Dragon
0
172
Member Avatar for aquarian

did you try [URL="http://www.google.com/search?hl=en&q=Apriori+Algorithm+for+finding+frequent+itemsets&btnG=Google+Search"]google[/URL]?

Member Avatar for Ezzaral
0
1K
Member Avatar for thilinam

I don't think there is anything like that for c++ because c++ programs are pretty much operating system specific. Yes the language itself is os independent, but to make c++ programs do anything worthwhile they have to make os-specific function calls, and the programs have to be recompiled for each …

Member Avatar for thilinam
0
1K
Member Avatar for Craftknight

The first thing you need to do is check your computer's file system and see if the file name you enter is in the same directory as where your program is running. If it is somewhere else then you need to specify the full path to the file, such as …

Member Avatar for Craftknight
0
140
Member Avatar for cretaros

why do people post *.zip files that can't be opened by WinZip??? What did you use to create that file?

Member Avatar for sergent
0
88
Member Avatar for Derek Elensar

The difference depends on the compiler you are using. Some compilers treat them the same, while others don't. With vc++ the <> tells the compiler to only look in its standard include directories (there are options to add to the list of directories), while the "" tells the compiler to …

Member Avatar for Derek Elensar
1
13K
Member Avatar for atticusr5

>>typedef int Addr_t; Why are you assuming addresses are integers? They aren't. Redefine that as [icode]typedef char* Addr_t;[/icode] or [icode]typedef Tree* Addr_t[/icode], or whatever data type it is. If you need a generic pointer than [icode]typedef void* Addr_t;[/icode] should do it, then you can typecast it to the appropriate type.

Member Avatar for mike_2000_17
0
148
Member Avatar for irinaki

The errors mean that you failed to write the implementation code for those functions.

Member Avatar for chrjs
0
179
Member Avatar for Auraomega

>>I'm not doing this inside any operating system Oh! :-O Then how are you running that program?

Member Avatar for Auraomega
0
105
Member Avatar for BobFX

You will probably have to do things a lot differently when porting from C to CLR/C++. Microsoft has made a lot of things much easier to do. [URL="http://www.codeproject.com/KB/IP/socketsincsharp.aspx"]Here[/URL] is a tutorial for C#, which is a very close relative of CLR/C++.

Member Avatar for BobFX
0
475
Member Avatar for jingda

>>It's also somewhat difficult to differentiate between a legitimate member making inane comments and a sig spammer. I use post count and past posting history for that purpose. First time posters on PFO who make that kind of post get the post deleted, but not infracted or warned because there …

Member Avatar for Portgas D. Ace
0
289
Member Avatar for harinath_2007

you have to use the os GUI functions which depend on the os you are using. Displaying a progress bar with C language is a great deal more difficult than it is in java or many other languages.

Member Avatar for Moschops
0
105
Member Avatar for XCC111

The link error tells you that you have a symbol defined in two or more source files. You will just have to read all your source files to find the offending symbol. One way that can happen is to declare global variables in header files. To do that correctly you …

Member Avatar for Ancient Dragon
-1
408

The End.