15,300 Posted Topics

Member Avatar for Sh13

Initially assume its AM. To convert: if the hour is greater then or equal to 12 just subtract 12 and make it PM 11:30 is still 11:30 AM 12:30 becomes 0:30 PM 18:30 becomes 6:30 PM

Member Avatar for Ancient Dragon
0
226
Member Avatar for nukewarm
Member Avatar for nukewarm
0
106
Member Avatar for maggz

>>if someone could start the code for so it might be easy to continue Start with this: [code] #include <iostream> using std::cout; int main() { // put your code here return 0; } [/code]

Member Avatar for Ancient Dragon
0
82
Member Avatar for Ancient Dragon

Are you having database problems? All I can see of any thread is the first post -- nothing beyond that even in threads that have double-digit posts. Its not confined to just one thread but all threads on all boards.

Member Avatar for jbennet
0
178
Member Avatar for curt1203

Create four more variables, min, mintempnum, max, and maxtempnum then on line 46 check to see if the temp[i] just read is greater than max then set max to temp[i], and if temp[i] is less than min set min to be temp[i]. set mintempnum and maxtempnum to be the value …

Member Avatar for curt1203
0
490
Member Avatar for zipperhead

Probably because the program has trashed memory before the line with that new statement was executed. Uninitialized pointers, buffer overruns and writing beyond the bounds of arrays are the most common reasons.

Member Avatar for zipperhead
0
80
Member Avatar for daviddoria

You can not create an class object unless the class is fully defined. If all you have is a forward reference then all you can do is create a pointer of that type. [edit]try ^^^^ mitrmkar's suggestion [/edit]

Member Avatar for mitrmkar
0
110
Member Avatar for carnage

>>are those things mentioned complex? Yes, for someone who doesn't know anything about c++. You need to learn the C++ language before attempting a program that complex. Learn to crawl before running full speed. Buy an introduction to C++ book and start studying at page 1, and do all the …

Member Avatar for hammerhead
0
145
Member Avatar for nelledawg

[b]grandtotal[/b] us used both as a function and a variable name. You can't do that. See lines 17 and 34 (as well as others) line 59: max is undefined. But I guess you would have know that had you read your compiler's error messages.

Member Avatar for mitrmkar
0
161
Member Avatar for GPXtC02

Indexing into the second dimension of Scores is wrong, causing boundry overflow and scribblins all over memory. See below. [code] text>>Scores[i][0]; text>>Scores[i][1]; text>>Scores[i][2]; text>>Scores[i][3]; [/code]

Member Avatar for GPXtC02
0
262
Member Avatar for -genESIS-

So I guess all you need is the [URL="http://www.google.com/search?hl=en&q=c+bubble+sort"]bubble sort algorithm [/URL]?

Member Avatar for -genESIS-
0
183
Member Avatar for knight fyre

When writing in-line functions you can not leave out the variable names. What you have on line 2 is a data type -- Date is a class, not the name of an object. Code it something like this: [code] Licenses::Licenses(int id, string name, string ad, Date dt1, Date dt2) :issue_date(dt1), …

Member Avatar for knight fyre
0
136
Member Avatar for ITbull
Member Avatar for VernonDozier
0
104
Member Avatar for DJJazzyJim

you have to know the format of the files before you can parse them. There normally is nothing in the file that says "I'm a header record". You have to know that bytes 0 to ??? is the header record, if one even exists in the file. Evey binary file …

Member Avatar for katisss
0
160
Member Avatar for atish00

Not a typo. the & symbol in that statement returns the address of the memory at that location. &str[0] is the address of the first byte of the character array, so &strp[2] is the address of the third byte. strcpy() function requires two parameters, a pointer (or the address of) …

Member Avatar for Dave Sinkula
0
139
Member Avatar for MEDIAMAN39
Member Avatar for Serunson
0
34
Member Avatar for mom_of_3

Welcome to DaniWeb -- being a mom is the world's toughest job. Glad to see that you have some time to spare while the kids are in school and the baby's asleep. Narue, our Super Mod, is also a mom and a damed good programmer too. So I know you …

Member Avatar for Serunson
1
94
Member Avatar for henpecked1

You can not put array declarations in a header file then include that header file in two or more *.cpp files. If that's what you did then you should declare the array with the [b]extern[/b] keyword everywhere except in ONE and only ONE *.cpp file. [code] // header file [b]extern[/b] …

Member Avatar for henpecked1
0
229
Member Avatar for daviddoria

Actually I think you could implement something like you want if you pass NULL as the first argument and check for that value in the parameter list [code] void foo(const char* fmt, ...) { if( fmt != NULL) { // blabla } else { // do something else } } …

Member Avatar for Ancient Dragon
0
93
Member Avatar for Robb@W

You have to change the registry. create a command prompt then run regedit.exe. expand HKEY_CLASSES_ROT then scroll down until you find [b].cpp[/b] folder. delete it as you would any other folder in windows explorer. Do the same with .c and .h. Then exit regedit. Next open Windows Explorer and double …

Member Avatar for Robb@W
0
115
Member Avatar for monkey_boy_401

what code do you want to write? what compiler and operating system do you have ? There are lots of tutorials and books about how to get started. See some of the [b]Read Me[/b] threads at the beginning of this c++ board for a lot of other help.

Member Avatar for morb
0
110
Member Avatar for suresh1010

You need to post what you are attempting to do because its a little difficult for us to see your computer screen :) But I suspect you are asking about character arrays insterad of c++ strings. If that's the case, there are a couple ways to do it. One way …

Member Avatar for Ancient Dragon
0
180
Member Avatar for jimps

[QUOTE=jimps;539328]Ugh, one of my half retarded days. lol Thanks.[/QUOTE] We all have those kind of days on occasion. :)

Member Avatar for atish00
0
85
Member Avatar for johnqsmith

>>I get an bunch of linker errors like "duplicate symbol X found..." which are for symbols from b.h That indicates there are errors in the header files -- you are compiling the *.cpp files correctly. Post the header file, you probably have an object declared in it without the [b]extern[/b] …

Member Avatar for Ancient Dragon
0
188
Member Avatar for fiz hafiz

Seems like quite a large program. I would tackle it by dividing it into smaller portions. At the start do only the minimal amount needed to get the program going, such as create a student structure that contains the student information needed, such as name, matrix number, and a linked …

Member Avatar for Ancient Dragon
0
170
Member Avatar for knight fyre

depends on whether vehicle_Detals derived from People as public or private [code] class People { // blabla }; class vehicle_Detals : public People { // blabla }; class Visitor : public vehicle_Detals { // blabla }; [/code] In the above Visitor has the same assess to People as vehicle_Details has, …

Member Avatar for knight fyre
0
90
Member Avatar for CoolGamer48

you could check the success/failure of the open [code] ofstream fout ("ride.out"); if( !fout.is_open()) { cout << "Failed\n"; return 1; } [/code] [edit]commet and group buffers are too small. You didn't leave room the the null teriminator byte.

Member Avatar for Ancient Dragon
0
289
Member Avatar for demroth

line 16: That will statically allocate the array based on some random value of SIZE because SIZE was not initialized to anything. What you want is a pointer [code] int SIZE = 0; int* array = 0; [/code] lines 32 to 57 is not needed. You can easily get the …

Member Avatar for demroth
0
160
Member Avatar for Exo1337

line 13 and 15 are backwards. You have to open the file before you can use it for anything. Switch those two lines around. Next, you need to use brackets { and } to encluse all the code you want to be executed within that while statement. Without the brackets …

Member Avatar for codeaa
0
274
Member Avatar for IIMarckus
Member Avatar for vijayan121
0
111
Member Avatar for TheNNS

I'm going to McDonalds in about an hour -- and get paid for doing it :)

Member Avatar for Lardmeister
0
919
Member Avatar for majestic0110

Never worked on web programming -- don't know the first thing about it either. All my experience is with desktop and wireless (barcode scanners) devices and interfacing with other equipment you might find on assembly lines in manufacturing plants. Probably the most interesting one was writing a program for a …

Member Avatar for Lardmeister
0
154
Member Avatar for ithelp

Obviously appears to have a huge crash looking at that 2d picture, but given a 3d picture you would see that each of those planets are godzillion miles apart.

Member Avatar for sneekula
0
161
Member Avatar for MattEvans
Member Avatar for sneekula
0
228
Member Avatar for sfurlow2

that is stub.h ? line 18: [b]limit[/b] is an uninitialized variable, so it could be any old random number including 0. You need to initialize it with something if you expect that line to work properly. line 21: you need to test if input is <= 0 and if it …

Member Avatar for pmvignesh
0
168
Member Avatar for pottert

you mean like this: [icode]int x = 0x0F;[/icode] "0x" says the following characters are hexidecimal >>is there any way for me to indicate to the compiler that all variables are in Hex Its not necessaary. All integers can be interpreted as decimal, hecidecimal, or octal. The internal representation is the …

Member Avatar for Ancient Dragon
0
6K
Member Avatar for bleonard989

line 11 of main() is definitely wrong. YOu can't use cin like that. Not sure what you need to do there other than [icode]cin >> size;[/icode]

Member Avatar for Ancient Dragon
0
126
Member Avatar for Jboy05

>>if( Gpa >= 3.0)&&(Gpa==3.6) Re-read the requirement and you will figure out what is wrong. [icode]if( GPA > 3.0 && GPA < 3.6)[/icode] The voter one is wrong too, but I'm not going to just give you the answer. Hint: there is no return statement required. The statement about the …

Member Avatar for Ancient Dragon
0
115
Member Avatar for jrkeller27

write an == operator [code] class index{ public: index(string word); void putpage(int number); bool haspage(int number); bool operator==(index& idx); // compare the two class objects }; [/code]

Member Avatar for vijayan121
0
3K
Member Avatar for neknek

One way to do it is to create a change file that contains both the old and new values. Then to display all the changes just read that change file. As for the original file, if its a standard text file you will have to completly rewrite the file every …

Member Avatar for plgriffith
0
108
Member Avatar for Phantom5800

You should ask your question to whereever you got that compiler. Check if they have a forum where you can ask questions.

Member Avatar for rjsmith64
0
91
Member Avatar for farag

So you want to write your own compiler ? Or are you asking how to write a program that will run on a diskless computer ?

Member Avatar for farag
0
165
Member Avatar for begyu

>>But i don't know... I am not good at C++. I take it then that you did not write the code you posted. Did your teacher give you that code for this assignment or did you copy (steal) it from someone else ? (rhetorical question not to be answered here). …

Member Avatar for Lerner
0
137
Member Avatar for jessel

You can't do a linked list without the add, edit, and delete functions. But do a search for linked lists and you'll get hundreds of hits, such as [URL="http://www.daniweb.com/search/google.php?domains=www.daniweb.com&q=linked+list&sitesearch=www.daniweb.com&client=pub-8426641637123945&forid=1&ie=UTF-8&oe=UTF-8&flav=000000&sig=Au_QpLTb4IAmuMq6&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23BBBBBB%3BVLC%3A0033CC%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3AFFFFFF%3BALC%3A0033CC%3BLC%3A0033CC%3BT%3A444444%3BGFNT%3A0033CC%3BGIMP%3A0033CC%3BFORID%3A11&hl=en"]this list[/URL] here at DaniWeb

Member Avatar for zhelih
0
89
Member Avatar for darknight09
Member Avatar for Greg123

when sharing memory among threads you must synchronize access so that only one thread at a time has access to the object(s). One way to do that is to create a semiphore. How to do that depends on the operating system you are using, and possibly the compiler. Do a …

Member Avatar for Greg123
0
171
Member Avatar for Dr_Pepper
Member Avatar for nsoni

that's the wrong test for this problem. The file pointer is only invalid, very similar to using an unitialized pointer. >>is there any other way to test it. Probably check the return value of fprintf(). If it failed then most likely you have the problem you are describing. [quote] [URL="http://linux.die.net/man/3/fprintf"]If …

Member Avatar for Ancient Dragon
0
147
Member Avatar for nikita_knp

If you are using MS-Windows GUI then one of the commond standard M$ controls is a text editor (edit control). It may not do everything you would want it to do but does all the basic work. If you don't want to (or can't) use that then you will have …

Member Avatar for rizwan_aman007
0
160
Member Avatar for sfurlow2

suggestion [code] int main() { // put your code here return 0; } [/code] Ok, so lets assume you know how to do the above. You need a for/next loop that counts from 0 to 5, display a prompt, get input using cin, then keep track of the highest number …

Member Avatar for sfurlow2
0
469

The End.