5,676 Posted Topics

Member Avatar for grandalf62

Given that, another option is to have an array, one entry for each alarm. Option 1: When a value is received, [code] 1) if array entry = 0 a) print the alarm b) load 20 into the value 2) if array entry <> 0 decrement the array value [/code] This …

Member Avatar for jephthah
0
89
Member Avatar for anujsharma

Never claim your question is [I]urgent[/I]. Many people here will completely ignore any post that has that word in it. No question is ever urgent posted here. We'll answer it when we get to it. You're just lucky this time... As for your problem, [url=http://www.gidnetwork.com/b-58.html]see this[/url] Don't blindly output your …

Member Avatar for jephthah
0
446
Member Avatar for guest7

You need to [url=http://www.gidnetwork.com/b-58.html]read this about feof()[/url].

Member Avatar for guest7
0
129
Member Avatar for Aamit

Create a vendor class, a customer class, an item class, and an order class. Then decide on how they interact (which class connects to which class) and write the code that connects them.

Member Avatar for WaltP
0
90
Member Avatar for ankit894u

Plz rd da rulz uv da forum, an da stickies at da top. Stop using baby talk, we are adults here. And we are not a free homework service.

Member Avatar for WaltP
0
146
Member Avatar for cool_aj

You basically have to 1) create both months at the same time or 2) use a 2d array and load the calendar into the array. When done, print the array.

Member Avatar for cool_aj
0
115
Member Avatar for catagon

First question: Is this equation really supposed to return a julian date? [icode]julianDay = day1 + (153 * m + 2) / 5 + y * 365 + y / 4 - y/100 + y/400 - 32045;[/icode] It might help if [ICODE]getDayNumber()[/ICODE] [I]return[/I]s the value calculated.

Member Avatar for catagon
0
124
Member Avatar for Peyton

[QUOTE=Peyton;855960]Hi again, After doing what you said, I bumped into another problem. [/quote] It's not nice to [I]bump[/I] on a forum :D You cannot create an array nor matrix using variables for its size.

Member Avatar for ArkM
0
10K
Member Avatar for FlamingClaw

Green adds points to reputation. Red subtracts. Grey, no change to rep points. It's because the person that gives rep doesn't have enough posts that actually affect someone's rep.

Member Avatar for Ancient Dragon
0
68
Member Avatar for newbiecoder

1: Zero your [I]Total[/I] 2: Read the input as a string (hex) 3: Check each character and conve rt it into decimal value (A=10, B=11, etc) 4: Multiply [I]Total[/I] by 16 and add the above value 5: Back to 2

Member Avatar for WaltP
0
106
Member Avatar for AnujSuper9

[QUOTE=AnujSuper9;853641]Hello everyone, I'm working on a small assignment where I am supposed to write the code for the itoa function [icode]char* itoa(int Value, int Base);[/icode] without using any built-in functions, and where the returned value is allocated on behalf of the caller. Value being the integer to convert, and base …

Member Avatar for AnujSuper9
0
3K
Member Avatar for Akis2000

Iterations is the number of times to do the calculation. You use it correctly in your code: [code=cpp] cout <<" On how many iterations? "; cin >>i; for (long int n = 1; n <= i; n++) { [/code]

Member Avatar for Akis2000
0
272
Member Avatar for Dannyo329

[QUOTE=niek_e;853780]press ctrl-f in one of your threads and type: Mark as Solved. It will show you link that is just above the (purple in this case) "quick reply to thread" bar.[/QUOTE] Ctrl-F brings up the [I]FIND[/I] dialog in FFox and IE. At least for me...

Member Avatar for WaltP
0
86
Member Avatar for moiron

[QUOTE=moiron;847756]you mean the index = 0; i seriously don't know what that means. i have seen it before but i don't know what it does and which loop do i use? For loop? and how do i add the contents of my array[/QUOTE] If you don't know what [ICODE]index = …

Member Avatar for moiron
0
251
Member Avatar for Ramy Mahrous
Member Avatar for jbennet
0
80
Member Avatar for jct3u

Did you somehow fail to read all of the information posted all over this site about CODE tags, like 1) in [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] you were asked to read when you registered 2) in the text at the top of this forum 3) in the announcement at the top of this …

Member Avatar for DemonGal711
0
224
Member Avatar for ScienceNerd

Somehow I don't think this compiles. In my compiler: [code] Error E2268 x.cpp 15: Call to undefined function 'count_file_values' in function main() Error E2313 x.cpp 16: Constant expression required in function main() Error E2451 x.cpp 18: Undefined symbol 'cout' in function main() Error E2268 x.cpp 22: Call to undefined function …

Member Avatar for WaltP
0
128
Member Avatar for cassie_sanford

[QUOTE=cassie_sanford;852204]I have 2 functions: one has to calculate the total number of days spent on a trip and the other has to calcualte the time of departure on the first day of the trip and the arrival back home on the last day of the trip. [/quote] OK, so far …

Member Avatar for siddhant3s
0
497
Member Avatar for johnray31

Look at the header [B]ctime[/B]. All the time functions are there. A Google search should give you definitions and explanations.

Member Avatar for johnray31
0
181
Member Avatar for Trendkiller

Your first attempt was [I]much[/I] better. Writing functions is the way to go, as you were doing. Don't follow [B]nucleon[/B]'s advice. Do not use [ICODE]scanf()[/ICODE] to read strings. [url=http://www.gidnetwork.com/b-62.html]Here's why[/url]. Don't use [ICODE]feof()[/ICODE] either. [url=http://www.gidnetwork.com/b-58.html]Here's why[/url]. Tell us the following: 1) What is a stack? 2) How can a stack …

Member Avatar for Trendkiller
0
273
Member Avatar for Trav580

Here's a guy that was living on that forum RSS # Total Posts: 3,444 # Posts Per Day: 127.73 * Last Activity: 03-26-2009 03:03 PM * Join Date: 03-26-2009 * Referrals: 0 Looks like their bookkeeping needs some updating...

Member Avatar for jephthah
0
179
Member Avatar for deedub

What integer is '|'? That looks like a character so you cannot read it into an [I]int[/I] variable. To do what you need you'll have to read the input as characters. If you get a number, convert it to an integer. If it's not a number, do what you need …

Member Avatar for tux4life
0
2K
Member Avatar for jephthah
Member Avatar for BlackStar

[QUOTE=sharensla;851244]u should have to use cin instead of cin.get because cin.get mostly used in case of string use cin as below char choice[5]; cout<<"ENTER YOUR CHOICE"<<endl; choice=getche; switch(choice) case '1': sum=a+B; break; case '2': multi=a*b; //up to 5 choices and then default choice[/QUOTE] I'm at a loss. You say "[I]u …

Member Avatar for Narue
0
117
Member Avatar for aerobama

Why doesn't it compile? Don't you have a compiler? If you do, did you get errors? If you did, are we supposed to [I]guess[/I] what they are?

Member Avatar for siddhant3s
0
211
Member Avatar for brechtjah
Member Avatar for serkan sendur
Member Avatar for rock9449

Start by changing each line in the pseudo code into real code. Use the correct syntax for each command you use. Then add code before this conversion to add the things needed to make it compile -- like variable/array definitions, main(), header files, etc.

Member Avatar for WaltP
0
152
Member Avatar for LiBOC

This is a perfectly legitimate question for this forum. It's about reading special key sequences. The hardware is just a red herring in this case :icon_wink: 1B 5B 41 is called an escape sequence. In this case [ICODE]ESC [A[/ICODE]. So... When you read a 1B set a flag that remembers …

Member Avatar for jephthah
0
312
Member Avatar for xgmx

[QUOTE=Ancient Dragon;844664] Or little green monsters from Mars ???[/QUOTE] Just play Slim Whitman songs....

Member Avatar for sneekula
0
162
Member Avatar for amegahed3
Member Avatar for SpectateSwamp

Boy, you guys just don't understand. Birds don't [I]live[/I] in the sky. They land to sleep, they land to have their birdlets, they live most of their life not flying! As for the video -- what the heck was that about?!?!? :confused:

Member Avatar for jephthah
0
160
Member Avatar for MosaicFuneral

We can just get the code from [url=http://babelfish.yahoo.com]Bable Fish[/url] and modify it to properly format the translations to be syntactically correct for the new language. Should be trivial... :icon_twisted:

Member Avatar for MidiMagic
0
256
Member Avatar for Turyturbo

And when you [INLINECODE]strcpy(String, "abcdefghijklmnopqrstuvxyz")[/INLINECODE]; into a 26 character array like this you just blew past your array bounds because a 27th character (\0) is loaded too. Remember, a [I]string[/I] in C always ends in \0 and that [I]must[/I] be accounted for in the buffer.

Member Avatar for ThundrbltMN
0
244
Member Avatar for greg022549

[QUOTE=greg022549;842573]In this daniweb site, is there a way to search for a particular item. Example: I want to see what a solution may be for ssolving temperature? If so, how do I search all the threads for that. Just curious![/QUOTE] Umm, try typing in the particular item in the search …

Member Avatar for Dani
0
59
Member Avatar for Crago3

Because we already got our grades and passed the course. You can't pass using our work. You need to pass on your own work.

Member Avatar for Narue
0
459
Member Avatar for Narue

> Same. I always just type quote and quote I just hit *Reply w/Quote* and let the system add the quote tags with the quotee -- without the spacing or periods.... :icon_wink:

Member Avatar for WaltP
0
349
Member Avatar for coder101

Keep in mind that when you have a 'string' as an answer -- for example [icode]5' 2 3/4"[/icode] -- each of these answers will be wrong: [icode]5', 2 & 3/4" 5' 2 3/4" 5' 2 3/4" 5 ft, 2 3/4 in [/icode] IOW, a string input may not be a …

Member Avatar for WaltP
0
168
Member Avatar for joozi

And to prove that he's an..., try this: [code=cpp] #include <iostream> #include <fstream> using namespace std; int main() { char line[80]; ifstream inFile("x.x"); while (!inFile.eof()) { inFile >> line; cout << line << ' '; } inFile.close(); return 0; }[/code] Use this file: [code] ONE two Three [/code] What just …

Member Avatar for WaltP
0
103
Member Avatar for austinslik

[QUOTE=austinslik;428722]please help me in finding what is wrong with my array... its not sorting thanks, thanks. [/QUOTE] First, what [B]Ancient Dragon[/B] said is correct. Second, your sort needs [I]two[/I] loops, not one. Look at the description or algorithm of the sort again. Your code should be moving the highest value …

Member Avatar for austinslik
0
122
Member Avatar for wasge

What you are attempting to do can be done with arrays. [QUOTE=wasge;834577]Imagine you have an integer variable called "number" with a number, and when you executes a function, this function creates a variable called "audio1" and increments number (number ++; ). The next time this function will create another variable …

Member Avatar for wasge
0
229
Member Avatar for trixymix31

Start by defining two arrays, first to hold the values and second to hold the vowels themselves. Then use loops to check the input characters with the letter array and increment the correct value in the other array (or define a 2D array to make it easier). Then for the …

Member Avatar for trixymix31
0
99
Member Avatar for MosaicFuneral

[QUOTE=Comatose;827235]Well, the moderators who are supposed to strip those posts out would need to keep saging off.....[/quote] Moderators are not supposed to strip posts out [QUOTE=Comatose;827235]posting new questions in old threads isn't supposed to happen (or receive any kind of answer other than "how 'bout you post a new thread") …

Member Avatar for verruckt24
1
216
Member Avatar for kenji

Just use an index into the array and output one character with [icode]putchar()[/icode] at the correct screen location.

Member Avatar for John A
0
113
Member Avatar for jahkevin
Member Avatar for shamila08

[QUOTE=shamila08;830297]Hello..... i got a problem where my output are repeated..... how to solve this problem....[/QUOTE] [QUOTE=SeeTheLite;830303]Er nevermind, couldn't see that last bracket.[/QUOTE] Good. I'm glad you got it because you didn't tell us what the problem was which makes it hard to help you to solve it.

Member Avatar for WaltP
0
85
Member Avatar for jimjohnson123

[QUOTE=SeeTheLite;830146]Tag a system("pause"); before return 0; and see what happens. [/QUOTE] You might want to read [url=http://www.gidnetwork.com/b-43.html]this[/url].

Member Avatar for WaltP
0
1K
Member Avatar for launic

When you read a file that's a directory, call the function again. And learn to use CODE tags. There are at least 6 places on the site they are explained.

Member Avatar for zamp
0
579
Member Avatar for Tejas

Resurrecting a 5 year old thread to ask us to [I]give[/I] you a free grade is frowned upon.

Member Avatar for WaltP
1
237
Member Avatar for RexxX

[QUOTE=RexxX;817583]What way(s) can I reread the same file in C? I've only been able to find C++ tutorials. I tried: [code] fclose(infile); infile = fopen(argv[1], "r"); //error checking [/code] but this code didn't go to the beginning of the file.[/QUOTE] Any time you open a file you are automatically at …

Member Avatar for kenji
0
89

The End.