15,300 Posted Topics

Member Avatar for nadleeh

line 56 is wrong because the linked list is initialied to NULL every time that function is entered. What you have to do is pass variable [b]start[/b] from main() as a parameter into make_list(), like this (Note the double asterisk, or double pointer). [code] struct queue_node *make_list(struct queue_node** start) { …

Member Avatar for Ancient Dragon
0
101
Member Avatar for margeaux54

I think what you want is this: assumes number elements in array1 is the same as in array2 [code] int k = 0; int n = NumberElementsInArray1; for(int i = 0; i < n; i++, k++) { if( array1[d].ave > array2[e].ave ) { array3[k] = array1[d]; d++; } else if( …

Member Avatar for Ancient Dragon
0
219
Member Avatar for fab2

line 7 is not calling a function. You have to put () after the function name, such as day_menu(). You will also want to put something just before the return in main() (such as getchar()) to make the program stop so that you can see what is on the screen. …

Member Avatar for fab2
0
110
Member Avatar for UtaChan

If you look at [URL="http://spike.scu.edu.au/~barry/interrupts.html#ah0a"]this link[/URL] you will see that the first two bytes of the input buffer contain the buffer size followed by the number of characters in the buffer when the interrupt returns. You have to declare the buffer to be at least three bytes larger than the …

Member Avatar for UtaChan
0
241
Member Avatar for cayman

use [URL="http://msdn.microsoft.com/en-us/library/aa363194(v=vs.85).aspx"]Windows communications functions[/URL]. You can't access the ports directly as you did in MS-DOS. Instead, you have to open the com port using CreateFile(), then set up the port parameters with SetCommConfig(). After that you use ReadFile() and WriteFile() to read and write to the com port. For ReadFile() …

Member Avatar for Ancient Dragon
0
696
Member Avatar for shinsengumi
Member Avatar for Ancient Dragon
0
214
Member Avatar for cloudspade
Member Avatar for cloudspade
0
322
Member Avatar for Ancient Dragon

Glad to see you are working on the spacing problem with icode tags. Now we don't have to add those extra blank lines after the [noparse][/icode][/noparse] tag. Good work :)

Member Avatar for WaltP
0
129
Member Avatar for romi_001

The problem with it under Web Development that everyone assumes that's the only purpose for databases. It isn't. Maybe it would be more logical and useful for it to be under Software Development.

Member Avatar for Dani
0
230
Member Avatar for oab2003
Member Avatar for AODfan

Read the file a word at a time instead of a character at a time. [icode] std::string word while( FileIn >> word ) { // blabla } [/icode] Then if the word is 3-6 characters add it to a list with a counter for the number of times that word …

Member Avatar for Ancient Dragon
0
116
Member Avatar for TailsTheFox

There is no "general" way to do it because it is operating system specific. C and C++ do not themselves have direct support for keyboards and mice. You could use ncurses which has been ported to both MS-DOS and *nix (there is not MS-Windows gui version of it).

Member Avatar for pseudorandom21
0
212
Member Avatar for rbduck09

All the if statements starting on line 79 are wrong. Why? Because PHLEVEL is an integer, therefore by definition it does not have decimals. PHLEVEL is not a real number (float or double). Those lines are also badly formed -- they need to be like this: [icode]if( PHLEVEL >= 0 …

Member Avatar for Ancient Dragon
0
155
Member Avatar for quintoncoert

yes it can be done, and yes it is more complex then doing it from basic or java. There are several free c++ classes that make database accessing easier -- see [URL="http://www.google.com/search?hl=en&q=c%2B%2B+odbc+classes"]these google links[/URL] There are other ways to do it too, but ODBC is the most versatile because your …

Member Avatar for Ancient Dragon
0
762
Member Avatar for g_u_e_s_t

call strcat() from string.h header file. But be careful -- the desgination character array has to be large enough to hold both strings, and it can not be a pointer into read-only memory (e.g. string literals). [icode] char boy[] = "Harry"; char* boy = "Harry"; // <<<< this is also …

Member Avatar for Ancient Dragon
0
129
Member Avatar for JesseFarmer

>>When I run the program and enter the value for cSalary the program just closes You have to put something at the end of main() to prevent that from happening. One way to do that is to add a line [icode]cin.get() before main() returns.[/icode] Programs execute the lines from top …

Member Avatar for Ancient Dragon
0
131
Member Avatar for Ancient Dragon

See the red arrow on the screenshot. This only happens in DaniWeb threads, nowhere else. The browser IE8 seems to always be waiting for something.

Member Avatar for Ancient Dragon
0
115
Member Avatar for yeto
Member Avatar for geoffy0404

It isn't necessary to typecast total because total was declared as an int I would line up all the else's and reverse the order of the tests [code] if( total < 60) printf("You are failing with a %d percent \n\n", (int) total); else if( total < 70) printf("%c---------||-----%d Percent\n\n", gradeLetters[3], …

Member Avatar for abhimanipal
0
220
Member Avatar for iammirko

For MS-Windows operating systems you want to write a [URL="http://www.google.com/search?source=ig&hl=en&rlz=1G1GGLQ_ENUS397&q=c%2B%2B+windows+service+tutorial&aq=1&aqi=g6g-m4&aql=&oq=c%2B%2B+windows+service"]Windows Service program[/URL] The first few google links will tell you how to do that.

Member Avatar for Ancient Dragon
0
333
Member Avatar for george61

You can write your own large number library using character arrays to hold each digit. [URL="https://mattmccutchen.net/bigint/"]Here[/URL] is one such library (c++ class)

Member Avatar for iammirko
0
402
Member Avatar for triumphost

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

Member Avatar for Ancient Dragon
0
91
Member Avatar for *Java*

win32 api function [URL="http://msdn.microsoft.com/en-us/library/ms682425(v=vs.85).aspx"]CreateProcess[/URL]() will let you do it, and I think it will even let you specify the screen size in the [URL="http://msdn.microsoft.com/en-us/library/ms686331(v=vs.85).aspx"]startupInfo[/URL] parameter.

Member Avatar for Ancient Dragon
0
293
Member Avatar for chester1908

The first parameter is not char** but char*. Delete key1 and key2 because neither are needed. And the last parameter is a pointer to your comparison function, which will be something like the following. Is variable catFreeEntry the number of elements in the catalog array of structures? [icode] int compare(void* …

Member Avatar for chester1908
0
397
Member Avatar for mpike
Member Avatar for mpike
0
164
Member Avatar for Mahkoe

I prefer them too, but they are not compatible with other languages or most win32 api functions. If you are not concerned with either of those then by all means use std::string.

Member Avatar for mike_2000_17
0
1K
Member Avatar for packetpirate
Member Avatar for shinsengumi

why are you doing that one character at a time? You can write the entire buffer all in one function call using fwrite(). You will want to open the file in binary instead of text mode. [icode]bytewritten = fwrite(buf,1,payload,fp);[/icode]

Member Avatar for shinsengumi
0
219
Member Avatar for CanaznFTW

can not have function name the same as a variable name. Change one of the two.

Member Avatar for floatingDivs
0
134
Member Avatar for boot-baby-boot

Lots of programs that do it -- [URL="http://www.mysql.com/products/workbench/"]MySQL Workbench[/URL]. For a simple version such as what you want you will need to know SQL so that you can retrieve the information (table names, and information about each of the columns in the table). Then you will have to know how …

Member Avatar for Ancient Dragon
0
452
Member Avatar for Khoanyneosr

You are experiencing a very common problem for new coder. When you enter Y for answer then you also press the Enter key, which is '\n'. That key stays in the keyboard buffer because your program only extracted the first character that was typed. You have to flush all the …

Member Avatar for VernonDozier
0
592
Member Avatar for jackmaverick1

The if statement on line 5 is wrong. You should be calling one of ifstream's metods. Sould be like this: [icode]if( install.is_open())[/icode]

Member Avatar for mike_2000_17
0
117
Member Avatar for ntrncx

As with many other things there are no right or wrong answers to the questions you have asked. One programmer may do it one way while another programmer will do it some other way. Its all a matter of personal preferences, or in some cases, company coding policy. 1. Generally, …

Member Avatar for ntrncx
0
130
Member Avatar for jayzee1989

You can simplity all those if statements if you convert menuinput to either upper or lower case. And then you can use a switch statement. You can also delete all those variables on line 11 and initializations on lines 16-33. [code] menuinput = toupper(menuinput); switch(menuinput) { case 'A': // blabla …

Member Avatar for jayzee1989
0
146
Member Avatar for sarge66

You have to declare functios before they can be used. Add a function prototype for menu() befor main().

Member Avatar for Ancient Dragon
0
255
Member Avatar for taumang

There is no correct solution to the problem because: 1. The variable x is undefined and we don't know its initial value. 2. The value of x never changes, therefore that is an infinite loop 3. There is no if, so the else is incorrect.

Member Avatar for Ancient Dragon
0
83
Member Avatar for jhong12
Member Avatar for bobbyg23
0
71
Member Avatar for tomtetlaw
Member Avatar for shbunch

I think you have mis-understood the assignment. Read it again, it doesn't want you to create a class named incrementMinutes but that is jusst the name of one of the class's methods. The name of the class is probably Time. I think you should post the exact wording of the …

Member Avatar for VernonDozier
0
100
Member Avatar for vineeshvs
Member Avatar for 'Stein
Member Avatar for susheelsundar
0
593
Member Avatar for Dionysus

In order to deleted text from a file you have to rewrite the entire file but omitting the text to be deleted. you can't just delete text in the original file.

Member Avatar for James Lloyd
0
999
Member Avatar for sheennave

is the program gui or console? What operating system? What compiler? We need a lot more information before anyone can give you any help.

Member Avatar for sheennave
0
105
Member Avatar for zetologos

>>printf("%s", bin);//pass bin must be a null-terminated character array if you want to use printf() to display its contents. For example. Note that you don't have to specifiy its size, the compiler will figure that out for you from the list of initializers. [icode]char bin[] = {'0', '0', '0', '0', …

Member Avatar for jnawrocki
0
130
Member Avatar for TimBob12

>>allows structs, but not objects. string is an object, or more technically called c++ class.

Member Avatar for Layosh
0
3K
Member Avatar for jephthah

If you ever used a Microsoft compiler you would know that they always produce stdafx.h, which is a catch-all for other includes. The most useful use of it is to compile c++ programs with pre-compiled headers. But this is a C forum and not C++ so precompiled headers is not …

Member Avatar for Ancient Dragon
0
486
Member Avatar for bleedsgreen33

The first word in each line appears to be the account number. Everything from the end of the first word up to the first numeric digit can be assumed to be a name. After the name, everything up to either +, -, or a digit is the address. There's a …

Member Avatar for Ancient Dragon
0
364
Member Avatar for ankur_

Huh?? What is "qcheck=all"? Is that a compiler option in Aix Unix os, such as [URL="http://publib.boulder.ibm.com/infocenter/cellcomp/v101v121/index.jsp?topic=/com.ibm.xlcpp101.cell.doc/compiler_ref/opt_check.html"]this one[/URL]?

Member Avatar for Ancient Dragon
0
107
Member Avatar for WASDted
Member Avatar for JamieLynnSEO
8
492
Member Avatar for Ancient Dragon

[URL="http://www.youtube.com/watch?v=T67DvoH2H3E&feature=player_embedded"]Do you know what you are eating?[/URL]

Member Avatar for bumsfeld
0
150

The End.