15,300 Posted Topics

Member Avatar for COKEDUDE

>"The array length is %c %c \n That doesn't print the array length. It prints the character at the ith element in each array. The two are not the same things.

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

how to send text/graphics to a printer depends on the operating system. If the printer is attached to LPT1 port (most are USB or wifi nowdays) then just open LPT1 as if it were a text file. Otherwise it's pretty complicated, as shown in[ this Microsoft article](http://support.microsoft.com/kb/246772) I don't know …

Member Avatar for Ancient Dragon
0
229
Member Avatar for weeraa

That's a common sorting problem with numerical data represented as strings. Correct the problem by right-aligning the numbers, embed either spaces or 0s to the beginning of each number so that all numbers are the same width. for example the first value, 10, would become 0010 so that it's the …

Member Avatar for Ancient Dragon
0
437
Member Avatar for laleh.97
Re: pi

>why isn't this code work??/ You need to explain a bit more. Do you take your car to a machanic and just say "it doesn't work". Of course not, you tell him the symptoms, such as it doesn't start. Programming is a bit like that -- we can't tell you …

Member Avatar for rubberman
0
228
Member Avatar for Lee_2

When you created the project did you tell the wizard to use precompiled headers or did you uncheck that box? If it was left as the default (checked) then all \*.cpp files must include stdafx.h as the very first include file. If the project contains any \*.c files then you …

Member Avatar for Lee_2
0
272
Member Avatar for kibbs_it

Since you are beginner, go through [this free tutorial](http://www.homeandlearn.co.uk/NET/vbNet.html). When you are finished you will be able to answer your own question.

Member Avatar for Ancient Dragon
0
58
Member Avatar for atzounis

You could use global variables, that that is normally fround upon because it can lead to bugs and errors. you sould nest the functions like this: `functionB(a,b,FunctionA(a,b));`

Member Avatar for NathanOliver
0
269
Member Avatar for Warrens80
Member Avatar for Jacobpaulio

I hear MACs are good at that :) A friend of mine has one and it's always crashing.

Member Avatar for tompatrick
0
810
Member Avatar for Warrens80

Did you buy it yourself or get it as a gift? When you have to pay for it yourself then you'll be a little more careful.

Member Avatar for Warrens80
0
168
Member Avatar for Warrens80

> you cannot sell a "beef taco" if you cannot show that it actually contains beef So what do they use up there in Canada?? The Tocco Bells around here use hamburger, which is ground beef. At least I don't think they use horsemeat or dogmeat. I'm not a big …

Member Avatar for mike_2000_17
0
468
Member Avatar for pro.soltan

>i wana to initalization all rooms ids and all beds id once time not every time i run the programmme Not possible unless you save the info to a text file and re-read it when the program starts. Once the program terminates evrything is lost, just like when you turn …

Member Avatar for richieking
0
91
Member Avatar for Kratoswoo

See the examples [here](http://msdn.microsoft.com/en-us/library/b873y76a(v=vs.110).aspx) how to split the string into it's individual tokens

Member Avatar for ddanbe
0
234
Member Avatar for pro.soltan

Do you know how to do file I/O? If not then you need to read a tutorial or your textbook about it. To alter or delete a patient from the text file, the text file has to be completly re-written, there is no way to modify or remove strings from …

Member Avatar for pro.soltan
0
147
Member Avatar for Nour T.

I don't think explorer.exe can be removed -- it's an integral part of the operating system. See [this article](http://en.wikipedia.org/wiki/United_States_v._Microsoft_Corp.) about a lawsuit.

Member Avatar for ryanjayson
0
394
Member Avatar for Ancient Dragon

New buttons are nice -- but will you please add tool tips so that we know what they are? For example buttons for Report Post (Flag) and the other one next to it (I have no idea what it does).

Member Avatar for Reverend Jim
2
183
Member Avatar for programmer76
Re: 2020

[Here's](http://voices.yahoo.com/the-ghz-computers-today-vs-years-ago-6252290.html) an interesting article about how computer speed has changed since the 1980s. That's not to say that processor speed will continue to increase at that rate, most likely motherboards will just support more cores, for example the processor in my computer has 8 cores, and I know of motherboards …

Member Avatar for ddanbe
0
383
Member Avatar for Warrens80
Member Avatar for joyrogg
0
114
Member Avatar for happygeek

I bought a Galaxy Note 3, nice large screen yet small enough to put in my pocket. And it doesn't say Apple on it :)

Member Avatar for Kelly Burby
0
369
Member Avatar for Xantipius

Interesting, apparently I'll never get cancer :) >The fact that capsaicin and other vanilloids are already commonly found in the diet proves they are safe to eat. >This could make development of a drug containing them a much quicker and cheaper process. But will the new drugs contain a significantly …

Member Avatar for jwenting
0
366
Member Avatar for Saboor880

[Here's](http://www.homeandlearn.co.uk/NET/vbNet.html) a great tutorial to get you started with vb.net, I refer to it often myself.

Member Avatar for Saboor880
0
541
Member Avatar for saja.omarii.7

what part(s) of the assignment don't you understand? Post your attempt to at least begin the assignment.

Member Avatar for Jamblaster
0
338
Member Avatar for qhweeman

Do it in small parts so that you don't get overwhelmed. First, write the program and inputs three integers. After you get that working, you can add some more to sum up the three integers as you enter them. After that, so each of the other parts, and soon you …

Member Avatar for Jamblaster
0
169
Member Avatar for add.steve

This worked for me ok (note: I changed the name of the database to be one that's already on my computer). Also used System.IO.File.Copy() instead of win32 api copyfile(). Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim path As String = Application.StartupPath & "\Database1.accdb" Dim backup As …

Member Avatar for Ancient Dragon
0
874
Member Avatar for Ancient Dragon

See [this thread](http://www.daniweb.com/software-development/cpp/threads/467817/read-text-file-as-string#post2038001). Why does the code start with '[' and end with '](NULL)' ???

Member Avatar for Dani
0
93
Member Avatar for VUEKID

if it's const char array then you won't be able to add text from a text file to it. But maybe what you want is a function whose parameter is const char\*?

Member Avatar for iamthwee
0
496
Member Avatar for prettyknitty

The loop on line 36 is wrong int *expandArray(int arr [], int size) { int *newArray = new int [size * 2]; int index; for (index = 0; index < size; ++index) newArray[index] = arr[index]; // for (int newElem = 10; newElem <(size*2); ++ newElem) while(index < (size*2)) newArray[index++] = …

Member Avatar for Ancient Dragon
0
913
Member Avatar for ~s.o.s~

Ntnkmr: Your version does too much work -- it's not necessary to use a temporary buffer. Once you find the first non-space character move all remaining characters to the beginning of the line.

Member Avatar for Ancient Dragon
0
3K
Member Avatar for Dearden
Member Avatar for Prithvi.R.K

you can also do it without a loop by calling memcmp(), which compares two arrays byte-by-byte. int a[] = {1,2,3,4,5}; int b[] = {1,2,3,4,5}; if( memcmp(a,b,sizeof(a)) == 0) { printf("They are the same\n"); } else { printf("They are different\n"); }

Member Avatar for Prithvi.R.K
0
204
Member Avatar for cambalinho

Does that mean you are trying to write your own compiler? If yes, then check out [Yacc ](http://dinosaur.compilertools.net/yacc/)(Yet Another Compiler Compiler) or [Bison](http://gnuwin32.sourceforge.net/packages/bison.htm) which translates Yacc code into C code. >can anyone tell me all the macro consts? Huh? See [this article](http://www.cplusplus.com/doc/tutorial/preprocessor/). macros are evil -- sould not be used.

Member Avatar for Ancient Dragon
0
224
Member Avatar for .............
Member Avatar for .............
0
555
Member Avatar for Trekker182

strncpy() is similar to strcpy(), both functions take two null-terminated character arrays as arguments. So neither of those functions will work in your situation. Before calling updateWIP() ***array*** needs to contain the same number of characters as in the word that the user is trying to guess. So if the …

Member Avatar for Trekker182
0
168
Member Avatar for HiHe

I don't work any more, but I use a nearby public light rail train (free parking) to travel to the airport which is about an hour's drive away. It's a lot cheaper and easier than driving there then finding a place to park. I could also use it to go …

Member Avatar for pixelsoul
2
181
Member Avatar for kal_crazy

>after getting 5 posts voted up without a comment can be equivalent to one post voted up with a comment Won't work because different members affect reputation in different ways when leaving a comment. The number of rep points that I affect are a lot greater then the number of …

Member Avatar for Warrens80
0
348
Member Avatar for Curious Gorge

The error is not related to the compiler. When you try to execute the program the operating system is looking for that DLL and can't find it. The DLL must be in one of the folders that is in the PATH environment variable or in the same folder as the …

Member Avatar for Curious Gorge
0
228
Member Avatar for Prithvi.R.K

Did you write a prototype for Complement() before main() or does the function appear in the source file before main() ? For example: void compliment(int a[], int m); // Function prototype int main() { } void compliment(int a[], int m) { }

Member Avatar for Prithvi.R.K
0
133
Member Avatar for princessophia
Member Avatar for iamthwee
0
218
Member Avatar for cambalinho

You'd have to redeclare the function even if you could overload ::, so what's the problem? class test { public: virtual void Created() {cout << "Hello from test class\n";} test() { Created(); } }; class Child : public text { public: virtual void Created() {cout << "Hello from Child\n";} }; …

Member Avatar for Ancient Dragon
0
246
Member Avatar for word2the wise

I don't think you will ever find a "complete" word list -- new words are added to the Engligh language all the time. Have you searched for "dictionary database" ? If all you can find are files that contain definitions, then write a short program to strip off the definitions …

Member Avatar for L7Sqr
0
132
Member Avatar for Mr.M

I think what you want is a [Windows Service Program](http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.110).aspx)

Member Avatar for Mr.M
0
250
Member Avatar for dave.schroeder.906

I see the return statement on line 16, but nowhere else. What happens if the test on line 10 fails -- what will the function return??

Member Avatar for Michael27
1
304
Member Avatar for overloaded

What compiler and operating system are you using? Have you checked the size of the arrays that the program is using to see if it's attempting to write outside the bounds of the array?

Member Avatar for overloaded
0
328
Member Avatar for Trekker182

CompareWord() returns on the first character. If the first character of each array are the same then CompareWord() returns i, which will always be 1, otherwise it always returns -1. Is there only one word in each of the two arrays? e.g. not a sentence? If so, then you need …

Member Avatar for Trekker182
0
256
Member Avatar for dan4oto

> scanf_s("%ch", &answer); Should be just "%c", not "%ch". > fflush(stdin); Nonstandard. fflush() is guarenteed to work only with stdout and other output streams. Some compilers support stdin, but that won't work with all compilers. When learning to program it's best to stay with standard C functions and not compiler-implementations. …

Member Avatar for Nishali
0
137
Member Avatar for cambalinho

[This article](http://www.codeproject.com/Articles/27819/Style-Toolkit-Use-advanced-graphics-techniques-to) might be of interest to you. Codeproject.com has one of the largest repositories of free Windows code that you will find on the internet. You will find examples of almost anything you want to do there.

Member Avatar for cambalinho
0
815
Member Avatar for Dani
Member Avatar for Dani
0
278
Member Avatar for mixelplik

setprecision() is in effect until you call the funcion to change the value for floats and doubles. Assuming rate is either float or double, on line 3 call setprecision(0) to not display any decimals. Then on line 4 you have to call setprecision(2) again.

Member Avatar for mixelplik
0
136
Member Avatar for cambalinho

>the DefWindowProc() is on right place Maybe, depending on what you want the program to do after the switch(). Probably in most cases it should be like below. But that won't work if there is more code to add after the switch. LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, …

Member Avatar for cambalinho
0
153
Member Avatar for cambalinho

[Here](http://www.codeproject.com/Articles/155717/Handling-Enhanced-Mouse-Wheels-in-your-Application) is a good tutorial that explains exactly what you are looking for.

Member Avatar for cambalinho
0
292

The End.