15,300 Posted Topics

Member Avatar for AcidG3rm5

Your program does not include <string> for std::string class, so how in the world are you getting it to compile????? Don't attempt to execute a program that contains compiler errors or warnings. Yes, warnings in your code are usually errors too.

Member Avatar for ArkM
0
122
Member Avatar for lllllIllIlllI

[b]Location:[/b] My Town near St Louis Illinois [b]price in gallons:[/b] $2.05 (USD) $3.05 (AUS dollars) The price of gas is now 1/2 what it was a year ago.

Member Avatar for vmanes
0
194
Member Avatar for ting_ting

we don't do people's homework, but we will help if you show is some effort on your part. Post the code you have attempted and ask more specific questions.

Member Avatar for minas1
-1
85
Member Avatar for Duki

USA citizens do NOT cast votes for President/VP candidates. They vote for electors [url]http://en.wikipedia.org/wiki/U.S._Electoral_College[/url] [quote] Rather than directly voting for the President and Vice President, United States citizens cast votes for electors. Electors are technically free to vote for anyone eligible to be President, but in practice pledge to vote …

Member Avatar for Dave Sinkula
0
274
Member Avatar for Jacky1

put the code in a library or DLL than only distribute the lib or DLL along with the header file(s) that declares the function prototypes to the users. That is the common way to do it. Example: all the win32 api functions are in DLLs or libraries.

Member Avatar for Jacky1
0
87
Member Avatar for itsmeabhi_01

[url]www.codeproject.com[/url] has thousands of free programs, code snippets and libraries for MS-Windows.

Member Avatar for ddanbe
0
104
Member Avatar for starletcharmed

lines 26-31 are in the wrong order. Move them between lines 16 and 18. You have to validate the file is opened before you can read it. If that still doesn't fix the problem then I suspect the file is not where you think it is. On line 14 use …

Member Avatar for Ancient Dragon
0
113
Member Avatar for Ancient Dragon
Member Avatar for orwell84

C is probably a better language than C++. Lots of operating systems have been written using C. >>The next question I have is where to start. [URL="http://www.google.com/search?hl=en&q=how+to+write+an+operating+system&aq=f&oq="]Here are some google links [/URL]you should read

Member Avatar for ArkM
0
148
Member Avatar for extrov

you will have to use some sort of gui libraries and/or compiler. Depends on your operating system.

Member Avatar for extrov
0
172
Member Avatar for johnray31

[QUOTE=johnray31;730733]What is the reason that compiler will not detect this error if it is not in single file?[/QUOTE] You got it! The compiler only works with one *.c or *.cpp file at a time and creates object code files such as *.o and *.obj. Its the linker that puts the …

Member Avatar for Narue
0
281
Member Avatar for samush

What do you mean "it didn't work" ? Do you take your car to the repair shop and tell the repairman "it doesn't work" ? You have to be a lot more descriptive of the problem, and post an example project.

Member Avatar for samush
0
167
Member Avatar for caoboipro

Is that even possible? How can a computer program know if sound is actually coming out of the speakers or not? But maybe there's some interface with the sound card API that will indicate that ???

Member Avatar for Ancient Dragon
0
126
Member Avatar for sneekula

[quote]Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and not clothed. Dwight D. Eisenhower [/quote] That's not true -- war boosts our economy. Who do you think makes …

Member Avatar for Ene Uran
1
498
Member Avatar for mathematician
Member Avatar for sneekula

[QUOTE=sneekula;642449]I've been talking to Vicente Fox, the new president of Mexico ... to have gas and oil sent to U.S. so we'll not depend on foreign oil... --George W. Bush[/QUOTE] You mean Mexico isn't part of USA :) It might as well be, with all the illegals crossing the borders.

Member Avatar for Ene Uran
0
1K
Member Avatar for STUDENT#101
Member Avatar for Ancient Dragon
0
248
Member Avatar for Levio91

You could start by doing some of the exercises that people post here. Such as [URL="http://www.daniweb.com/forums/thread155587.html"]this one[/URL]. Read though the threads here and pick out a few programs that you think you can write.

Member Avatar for ithelp
0
73
Member Avatar for sinner
Member Avatar for Ancient Dragon
-1
51
Member Avatar for sinner

for a text file you just rewrite the file, leaving out the text you want to delete.

Member Avatar for Ancient Dragon
0
50
Member Avatar for DreamerZ34

Never heard of it. Good search indicates Prospero is a character in one of Shakespear's plays.

Member Avatar for DreamerZ34
0
66
Member Avatar for DLightman

You need to post the Queue class, especiall the enqueue() method. My hunch is that it does not make its own copy of the Customer class, but just uses the same pointer that is passed to it in the parameter. That's why it would wind up with all queue nodes …

Member Avatar for Insomniac119
0
140
Member Avatar for afg_91320

function prototypes normally are placed after all includes and before the first function. There are two ways (in C) and three ways in c++ to pass parameters. [list] [*] pass by value -- the object is just a copy of the value in the calling function. [*] pass by reference …

Member Avatar for Ancient Dragon
0
98
Member Avatar for foggy_coder

If the path contains spaces then cin >> path will not work because >> stops at the first space. To use spaces call getline(cin, path)

Member Avatar for foggy_coder
0
260
Member Avatar for vladdy191

C and C++ are not the same language, so don't expect C compilers to act the same as c++. There are many differences that you will encounter.

Member Avatar for Ancient Dragon
0
123
Member Avatar for kiwihaha

you don't initialize variables in header files becuse the variables don't exist. You have to declare variables in *.c or *.cpp files. You can, however, use the [b]extern[/b] keyword with variable in header files, but again they can not be initialized there. [code] // myheader.h file extern int myint; [/code] …

Member Avatar for Ancient Dragon
0
271
Member Avatar for Se7Olutionyg

You have to pay close attention to the compiler's error messages. Look at the first error message, the compiler will tell you which line the error is on. The list of errors may be different from compiler-to-compiler, so you need to tell us what compiler you are using and post …

Member Avatar for Ancient Dragon
0
186
Member Avatar for Helgso

If you are using MS-Windows then use FindFirstFile() and FindNextFile() to get the names of all subdirectories, then recursively call the function to process the files in each subdirectory. I have posted a [URL="http://www.daniweb.com/code/snippet370.html"]code snipped that may help you here[/URL]. It will get a list of the files that you …

Member Avatar for Helgso
0
2K
Member Avatar for muya08

some compilers complain if the last line of the file is not a newline. In the editor go to the last line and hit <Enter>. That should fix that warning.

Member Avatar for Ancient Dragon
0
72
Member Avatar for Ancient Dragon

[url]http://www.youtube.com/watch?v=aQd0ELH7SNI[/url] [url]http://www.youtube.com/watch?v=p-12Xo-U90Q&NR=1[/url] [url]http://www.youtube.com/watch?v=9g8Ja9-ergI&mode=related&search=[/url]

Member Avatar for sneekula
0
110
Member Avatar for The Dude
Member Avatar for sneekula
0
82
Member Avatar for The Dude

I heard about this on talk radio station this afternoon. Votors need to watch what happens very carefully. I trust those electronic voting machines even less than the paper ones (hanging chads).

Member Avatar for sneekula
0
69
Member Avatar for christina>you

Did you near Obama change the level from $250 to $120 ? I didn't. So that republican spear campaign add it just so much crap because they know they are really desperate.

Member Avatar for christina>you
0
174
Member Avatar for sacarias40

you need to learn how to create event handlers, which are functions that you write that MS-Windows calls then someone clicks on a menu item or button.

Member Avatar for Ancient Dragon
0
49
Member Avatar for Se7Olutionyg

>> getline(istream& fin, string& num_of_isbn, char '\n'); That is a function prototype, not a function call. As written, it will do nothing. If you want to actually call getline() then you need to change it to this: [icode]getline(fin, num_of_isgn); [/icode] -- Not the '\n' parameter (last parameter) is not needed …

Member Avatar for Ancient Dragon
0
184
Member Avatar for songkok

There are many ways to implement it, [URL="http://www.codeproject.com/KB/files/Sample_INI_File_in_C.aspx"]here is just one of them[/URL]. If you want to store information in the registry instead of ini files then [URL="http://www.codeproject.com/KB/system/NtRegistry.aspx"]here [/URL]is a good c++ class, although there are many others.

Member Avatar for songkok
0
116
Member Avatar for Bhoot

I don't think there is any set rule -- depends on the message. Look at the message description in MSDN. Some say to return TRUE if you want to base class handler to be called, or FALSE if you don't. Also, in some cases you may want the base class …

Member Avatar for Bhoot
0
160
Member Avatar for vladdy191

The function arguments must be the same type. f and g take an int, while h takes a char.

Member Avatar for skatamatic
0
148
Member Avatar for college.student

You are using a Microsoft compiler, and it creates projects that, by default, use precompiled headers. If you want to use precompiled headers then the very first include file must be stdafx.h [code] #include "stdafx.h" // other stuff here [/code] If you don't want to use precompiled headers then go …

Member Avatar for vmanes
0
101
Member Avatar for ragaven

The stat() or _stat() function will also validate the existance of a file and will return some information about the file

Member Avatar for Ancient Dragon
0
342
Member Avatar for ajay.krish123

I know with MS-DOS 6.X and earlier it was possible to do that pretty easily with assembly code, but for console windows in MS-Windows I don't think it is possible. If you have a win32 GUI program then you would implement [URL="http://msdn.microsoft.com/en-us/library/ms997557.aspx"]scroll bars[/URL] You might also check out some of …

Member Avatar for Ancient Dragon
1
279
Member Avatar for riscphree

try starting a new console Hello World project and see if it links ok. It that's ok then add the files in the project that gives you the problem.

Member Avatar for Ancient Dragon
0
36
Member Avatar for freelancelote

That's because you enclosed the \0 in double quotes. Change it to single quotes [icode]pPtr->myArray[127]= '\0';[/icode] If myArray is less than 128 bytes then the above will cause buffer overflow.

Member Avatar for Ancient Dragon
0
109
Member Avatar for DGeneral

>>What I couldn't figure out is how to find the word's location in a line According to the description of the program you posted all you need is the line number, not the location within the line. For line numbers, just use an integer to keep track of them. You …

Member Avatar for Ancient Dragon
0
183
Member Avatar for chococrack
Member Avatar for jbennet
0
147
Member Avatar for ladyhuslter

You posted your assignment and code, so what now? Are we to just admire the code you posted?

Member Avatar for chococrack
0
197
Member Avatar for Endlezz

>>I am new to C++ and am not currently in a class teaching it OpenGL requires at least a basic understanding of c++. So if you don't have that then wait until you have completed a couple semesters of c++ or read/studied the textbook. No one here is even going …

Member Avatar for Endlezz
0
128
Member Avatar for localp

typecast each character, such as [code] std::string x = "guy"; cout << (int)x[0]; [/code] Now, just put that in a loop, replace the 0 in [0] with loop counter and you have it.

Member Avatar for skatamatic
0
131
Member Avatar for Smed

The argument to XStart.exe contains spaces, so you need to wrap double quotes around it. See red [code] _tcscpy(tszCommandLine, _T("C:\\Program Files\\Hummingbird\\Connectivity\\12.00\\Exceed\\Xstart.exe [color=red]\"[/color]C:\\Documents and Settings\\username\\Application Data\\Hummingbird\\Connectivity\\12.00\\Profile\\XSW3.xs[color=red]\"[/color]")); [/code]

Member Avatar for Smed
0
109
Member Avatar for mrboolf

The two tests you posted look like two different directories -- they are not even close to listing the same files.

Member Avatar for mrboolf
0
126

The End.