15,300 Posted Topics

Member Avatar for jingda
Re: UFO?

UFO = Unidentified Flying Object -- it doesn't mean the UFO came from some other planet, all it means is that no one knows what it is. Most UFOs are eventually identified. Now if you asked us if we believe there is intelligent life on other planets, my answer would …

Member Avatar for Lardmeister
0
409
Member Avatar for shadowscape

I'd write a function that returns a random chracter. The function would have a loop that calls rand() to get a random number between 48 (which is the letter '0') and 122 (the letter 'z'). Now there are a few special characters between those two numbers, so you will want …

Member Avatar for rubberman
0
155
Member Avatar for Nick Evan
Member Avatar for jingda
1
227
Member Avatar for sfuo

The error messages indicate you are not linking with one or more required libraries. I don't know which one(s) though. Have you seen [URL="http://www.codeguru.com/forum/archive/index.php/t-406632.html"]this thread[/URL]?

Member Avatar for sfuo
0
392
Member Avatar for tundra010

Is this for an assembly language class you are taking? If yes, does your teacher allow you to just call C library functions? That sounds like cheating to me. line 19: what is the value of ecx?? You need to declare data for scanf() to store the results, just like …

Member Avatar for tundra010
0
244
Member Avatar for l1nuxuser

sqlite is fine for very very small jobs. But so are just simple text files. For large jobs you will want an SQL compliant database such as MySQL of even MS-Access. In that case you will have to learn SQL (Structured Query Language) [URL="http://www.google.com/search?source=ig&hl=en&rlz=1G1GGLQ_ENUS397&q=sql+tutorials&aq=f&aqi=g10&aql=&oq="]Links to tutorials here[/URL] [URL="http://msdn.microsoft.com/en-us/library/aa728901(v=vs.71).aspx"]Here[/URL] is another …

Member Avatar for Ancient Dragon
0
204
Member Avatar for bpushia

1. why is [b]a[/b] a float? The number of courses can not have fractions -- you can't take 1 1/2 courses can you? And you should use a more descriptive name for that variable and make it an integer. 2. arrays are always numbered from 0 to <number of elements>. …

Member Avatar for Narue
0
6K
Member Avatar for jingda

I don't think there is a list -- they just make them up as they go along :)

Member Avatar for Ancient Dragon
0
164
Member Avatar for wdearth

First, s2 is not declared large enough to hold 20 characters because it requires one more for the string null-terminating character. What value is passed into the function for variable index? My guess is either an uninitialized integer or the maximum length of the string. How to find the lengh …

Member Avatar for TrustyTony
0
169
Member Avatar for GrimJack

I doubt it will change anything because there are other people just like him who will take his place. The way I heard it is that we didn't just find his body, someone deliberately shot him in the head.

Member Avatar for VernonDozier
1
309
Member Avatar for papaSmurph
Member Avatar for geekme

You don't. Header files are not linked. You need to study [URL="http://alleg.sourceforge.net/"]this link[/URL]

Member Avatar for Ancient Dragon
0
45
Member Avatar for geekme

You must be using a 32-bit version of turbo c++ that borland released a few years ago. If so then your compiler is correct. You can't use those header files with 32-bit compilers.

Member Avatar for Ancient Dragon
0
171
Member Avatar for theguitarist

>>I just want to ask,do you hate your job? Nope, never did. If I haded the job then I'd quit and go work somewhere else where I liked it. I see no point in doing something I don't like to do, which is exactly why I'm not a farmer today. …

Member Avatar for theguitarist
0
146
Member Avatar for shanki himanshu

You dont', and you shouldn't. c() should not care who called it, but just do its job and return the results (if any) to the caller.

Member Avatar for rubberman
0
235
Member Avatar for dyingatmidnight

Here's an example win32 api project. The code not posted was just generated by vc++ 2010 express IDE and is not relevent. Note that the TimerProc() doesn't have to call KillTimer() but it should if the TimerProc() will take longer to process than the amount of time between calls to …

Member Avatar for Ancient Dragon
0
388
Member Avatar for tubby123

Some programs spawn other programs, for example program A calls program B. In that case the return value of main() in program B can be caught by program A and used to determine if program B completed its task successfully or not. That's not the only reason, but just one …

Member Avatar for Ancient Dragon
0
151
Member Avatar for RenanLazarotto

close. >>if(password == "123456" Since password is an integer you don't need those quotes, and you do need a ) at the end [icode]if(password == 123456)[/icode]

Member Avatar for Ancient Dragon
0
115
Member Avatar for scobi
Member Avatar for tubby123

>>Logically speaking , you should be able to put a clrscr() anywhere right ? Wrong. 1. Its [b]int[/b] main, not void main() 2. In C programs all variables must be the first things declared in a block of code. A block of code is one surrounded by { and } …

Member Avatar for Narue
0
145
Member Avatar for madmhan84

lines 17 and 18 can be combined [icode]sprintfstr1,("%d.%d", num1, num2);[/icode], then delete line 20 which calls strcat(), and delete str2 because it is not needed.

Member Avatar for Ancient Dragon
0
124
Member Avatar for wonkerloop

line 14: scanf("%f",&price[10]); You need to use the loop counter as the index into the array, such as [icode]scanf("%f",&price[count]);[/icode] And your program does not contain an infinite loop, line 10 is the correct way to code it.

Member Avatar for yashsaxena
0
166
Member Avatar for Anark10n

Worked fine for me. You probably need to make all three files part of the project, see thumbnail. >>Is there a way to automatically link all include files No.

Member Avatar for Anark10n
0
2K
Member Avatar for jswain323058

find() returns string::npos if not found, which is not the same thing as 0 or NULL.

Member Avatar for jswain323058
0
91
Member Avatar for laserlars

maybe there is already one or more keys in the keyboard buffer ??? I don't know a thing about MIPS assembly, but that is usually the cause in MS-Windows and *nix programs. Check the contents of the buffer to see if that is what happened. You might have to clear …

Member Avatar for Ancient Dragon
0
142
Member Avatar for vikrantk

[QUOTE=Saddi;1549201]try (dev c++) its free and open source[/QUOTE] Too old and uses obsolete version of MinGW. Use Code::Blocks instead, and its supported on both *nix and MS-Windows.

Member Avatar for Derek Elensar
-2
288
Member Avatar for Dani

[QUOTE=Nick Evan;1550477]Does it include a plane-ticket? :D[/QUOTE] Do you think this is "Wheel of Fortune" ;)

Member Avatar for Nick Evan
0
105
Member Avatar for TrustyTony

And how do you intend to calculate the 10%? Once I reach 10% do I just stop in mid sentence?

Member Avatar for WaltP
0
220
Member Avatar for jingda

Sure, why not?? There have been a lot of theories about where we came from. Mars is as good an explanation as any other because they are all nothing more than guesses. No physical proof exists anywhere in the universe about how life in Earth got started. Even if they …

Member Avatar for predator78
0
251
Member Avatar for WolfShield

We have a breakroom where I work. Occasionally we will have a charity fund drive where people bake cookies etc and put them on a table in the breakroom with a note to pay 50 cents each. At the end of the day all the food is gone and the …

Member Avatar for WolfShield
0
182
Member Avatar for prahesh

DLLs are not registered. DLLs have to be installed in one of the directories that are in your PATH environment variable. Instead of cluttering up someone else's directories with your DLLs you need to create your own directory then add its full path to the PATH environment variable. I think …

Member Avatar for prahesh
0
644
Member Avatar for Arbus
Member Avatar for predator78
0
206
Member Avatar for Mr. K

Of all those, I only use F5, F5, F9, F10 and F11 because those are the ones for compiling and debugging. I also like Ctrl+[ and Ctrl+] keys, which are macros for finding beginning and ending {, [ and (

Member Avatar for pseudorandom21
-2
249
Member Avatar for superjj

what operating system? what compiler? GUI or console? You have left out a lot of info that we need to help you.

Member Avatar for superjj
0
108
Member Avatar for Euphan

It reads gibberish because you failed to validate that the file was opened on line 16, which I can see that it was not. Your compiler should have produced an error message saying the std::stream.open() does not take a std::string object as the first parameter. [icode]ifs.open(inputfilename.c_str());[/icode] Then check if the …

Member Avatar for Euphan
0
243
Member Avatar for moshiurbest
Member Avatar for kiranroy
0
87
Member Avatar for Sahilroy

1. Do not use *.cpp files as includes in other *.cpp files. rename those two *.cpp files (functions_prototype.cpp and struct.cpp) to *.h. 2. Add <string> to functions_prototype.h. Many compilers, such as vc++ 2010 do not automatically include that header file. 3. Several times you have forgotten to add 1 to …

Member Avatar for Ancient Dragon
0
117
Member Avatar for javarook

main() never calls function search_number(). Also, you need to write a function that inserts a new node in the linked list. If the list needs 1,000 nodes you don't want to do what you coded that many times when one small function will do it for all of them. google …

Member Avatar for Ancient Dragon
0
172
Member Avatar for Ancient Dragon

See attached. I got that page by clicking New Posts. It shows a thread has 65 replies, but when I go to that thread it has only 1 reply, from Narue.

Member Avatar for Nick Evan
0
32
Member Avatar for Krammig

Which version of vc++ 2010 did you install? Express does not support atl or mfc.

Member Avatar for Krammig
0
382
Member Avatar for jingda
Member Avatar for Dani
1
155
Member Avatar for cppgangster

Standard C functions won't work, but One way to do it is to use non-standard conio.h functions. special keys will return one of two values the first time getch() is called, either 0 or 224. The actual key code is returned in the second call to getch() and will be …

Member Avatar for Ancient Dragon
0
152
Member Avatar for Ancient Dragon

Reagan was probably one of the best presidents in my lifetime, including JFK. A long-time movie star he knew how to capture his audience, for example [URL="http://www.youtube.com/watch?v=mN3z3eSVG7A&NR=1"]this YouTube clip[/URL]

Member Avatar for e-papa
1
331
Member Avatar for Sekhrian
Member Avatar for chintan_1671

what you apparently want is an array of _bstr_t objects. The COM way of doing that is to create a SAFEARRAY. [URL="http://www.roblocher.com/whitepapers/oletypes.aspx"]Here [/URL]is an article about them. I don't know how to use them from C#, but since your code used _bstr_t class then I would assume that it can …

Member Avatar for Ancient Dragon
0
444
Member Avatar for gaurav_13191

Because you need to add { and } around lines 30-32. The break statement is not within the if statement, so the loop on line 21 exits on the first iteration of that loop.

Member Avatar for koberoc
0
152
Member Avatar for Dasini

There are many different kinds of api's (application program interface), which is probably why you can't find a clear difinitive answer because there isn't one. An API is just a term used for a set of libraries that some one or some company has written that programmers can use in …

Member Avatar for griswolf
0
2K
Member Avatar for Khoanyneosr

Have you already written the delete function? View would be very similar. How to do them will depend on how you designed the text file. There are as many ways to do that as there are programmers to program it.

Member Avatar for Khoanyneosr
0
146
Member Avatar for naseerhaider
Member Avatar for sinatra87

cin.get() will not work either if there are still keystroks in the keyboard buffer. You will have to flush them out first. [URL="http://www.daniweb.com/forums/thread90228.html"] Here is a thread [/URL]that shows you how to do that. [edit]Oops! same as ^^^ said.

Member Avatar for sinatra87
0
2K

The End.