5,676 Posted Topics

Member Avatar for AmerJamil

Since you like to be repetitive: Do you know how to copy from one array to another? You should, [URL="http://www.daniweb.com/forums/thread332892.html"]after your other thread[/URL]. All you need to do is take that solution and modify/expand it to fit this situation.

Member Avatar for AmerJamil
0
196
Member Avatar for Lightslei
Member Avatar for WaltP
0
28
Member Avatar for gretty

You resurrected a thread that's been dead for 18 months to give this completely lame answer? How is the date returned as a string to [iCODE]main()[/iCODE] as the O/P requested?

Member Avatar for WaltP
0
1K
Member Avatar for Adami

To satisfy these requirements [QUOTE=Adami;]2. If user is trying to enter more than a N*N numbers, system will throw him out with an appropriate message. 3. If user provide less than a N*N numbers, system will throw him out with an appropriate message.[/quote] you need to loop simply waiting for …

Member Avatar for Adami
0
140
Member Avatar for MysticMan3000

[QUOTE=MysticMan3000;]My question is how can i ask the user to enter a certain hour of his choice e.g. 11:05:03[/quote] [code] cout << "Enter a time in the format hh:mm:ss -- " << endl; cin >> GetTime; [/code]

Member Avatar for jonsca
0
149
Member Avatar for Peram

1) By always outputting and inputting the exact same format in each file. [I]chargold[/I] is always, say, the third value read. 2) By outputting the name as you output the value: [iCODE]fdat << "chargold=" << chargold << endl;[/iCODE] Then as you read the file, when you read "[I]chargold=[/I]", the data …

Member Avatar for Peram
0
237
Member Avatar for Daita

Sorry, I can't see your screen from here. It might be nice to let us know [I]what[/I] errors -- or should we guess?

Member Avatar for Daita
0
148
Member Avatar for atoklas

That sounds even more convoluted. You could clear out the bits you don't want: [iCODE]i = i & 0xFFFFFF;[/iCODE] to make the value 24 bits.

Member Avatar for Trentacle
0
261
Member Avatar for hao90
Member Avatar for hao90
0
103
Member Avatar for IsharaComix

It is proper English, it's just not used often. It will rarely if ever be spoken. When written it feels like formal English rather than a more colloquial form. [QUOTE]You need Adobe Flash Player 8 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. …

Member Avatar for WaltP
0
277
Member Avatar for localp

This is not something Standard C++ is not able to do. You have to call some functions from the operating system, or some very non-standard functions that few compilers have implemented.

Member Avatar for localp
0
325
Member Avatar for steve_Student

Just add up "[I]5 Total duration of call in minutes[/I]" as they are calculated.

Member Avatar for sakijr
0
200
Member Avatar for gaurav_13191

Please learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] properly. It's very difficult to follow.

Member Avatar for gaurav_13191
0
183
Member Avatar for rhn94

If you need help, you need to explain [I]what[/I] you need help with. All you've said is "Here's what I need to do, Here's my code." No mention of what the trouble is.

Member Avatar for rhn94
0
738
Member Avatar for FutureWebDev

You're still blowing past your array. You need to stop 'playing' with the index. If you make a 10-element array, loop from 0 to 9, not 1 to 10. And don't add/subtract from the index.

Member Avatar for FutureWebDev
0
197
Member Avatar for amari ♥

Since you posted this as a POLL, not a request for help, my poll response is: You may fail your course because you cannot follow instructions. Following instructions is a [I]requirement[/I] in programming. See the Member Rules as requested when you joined.

Member Avatar for Trentacle
0
127
Member Avatar for NMAZ

Yes, we can help you. Yes, it is a silly request since you didn't bother to give us any indication what you need help with. We don't code for people, we help you fix [I]your[/I] code. Be sure to read the Member Rules.

Member Avatar for NMAZ
0
234
Member Avatar for Lando_
Member Avatar for johntodo

How would you do it on paper (IOW, how did you generate the above patterns?) Think carefully about your decisions when and how to use spaces and stars. Look at the patterns and using [B]jonsca[/B]'s hint you can translate your pattern into code.

Member Avatar for alexchen
0
142
Member Avatar for vinitmittal2008

It's too complicated. If all you are doing is adding two large numbers: 1) read the numbers as you did, have one more array for the answer. 2) convert each character digit to a numerical digit (hint: '3' - '0' = 3) 3) start at the end of each number …

Member Avatar for vinitmittal2008
0
188
Member Avatar for alexchen

Oh, ghod! Another one of those ridiculous suggestions to a student use a [I]vector[/I] instead of an array. A [I]vector[/I] is a higher level object and if you can't use an array properly, vectors are not the solution. The solution is to [I]learn to use an array![/I] Learn vectors when …

Member Avatar for ravenous
0
18K
Member Avatar for mastermikie
Member Avatar for WaltP
0
89
Member Avatar for kiel19

[QUOTE=Ancient Dragon;]Oh that's a great way to teach people how to program. I suppose if you every get a job you will expect eveyone else you work with to do your work for you so that you can sit on your ass and play with yourself.[/QUOTE] And he had to …

Member Avatar for WaltP
0
3K
Member Avatar for AlexYIN

"For Writing" - If the file does not exist, create it. If it does exist, open and empty it. "For Update" - Open an existing file, you can read from it, you an also write to it.

Member Avatar for AlexYIN
0
142
Member Avatar for hq1

Try changing your output from [iCODE]cout << w1 << " " << setw(8); [/iCODE] to [iCODE]cout << setw(8) << w1 << " "; [/iCODE]

Member Avatar for Dingbats
0
629
Member Avatar for packetpirate

[QUOTE=seanbp;]#include <stdio.h> #include <unistd.h> #include <termios.h> #include <iostream> [/QUOTE] This won't work at all using most compilers. I dare you to try it on VC++. Using O/S and compiler dependent solutions are problematic. These include * [ICODE]system("pause");[/ICODE] * Any Linux/Unix-only solutions: [ICODE]unistd.h[/ICODE] and [ICODE]termios.h[/ICODE] * Non-standard C function [ICODE]getch()[/ICODE], defined …

Member Avatar for MosaicFuneral
-1
2K
Member Avatar for mohd22

Why do you first time posters [I]always[/I] leave out the most important information to understanding the problem? The response to the information given: [QUOTE=mohd22;]I wrote the code but its gives me error [/QUOTE] That's because you did something wrong. Don't you think what the error is might be an important …

Member Avatar for alexchen
0
216
Member Avatar for alexchen

Do you really need help counting the characters in the string? Look at the methods associated with a string object.

Member Avatar for alexchen
0
1K
Member Avatar for groedius

To all those here asking for us to give them free code -- That's not how these forums work. You do the coding. You post what you have that doesn't work. We help you [I]fix[/I] that code. Do [B]not[/B] post code that simply has a comment that says "[I]// this …

Member Avatar for groedius
0
149
Member Avatar for omkar1987

Also 1) Improper C syntax [CODE] int loadToFile(FILE *f,int *file_pointer,int *length){ *length++; // executable statement double size=6000000; // definition statements int i; char *substr[6000000-50+1]; unsigned int no_of_strings; [/CODE] You must define your variables [I]before[/I] executing any code 2) You may be trying to create too much data. 78M on each …

Member Avatar for WaltP
0
124
Member Avatar for oggiemc

[QUOTE=cscgal;]Yes, cookies are required to contribute to DaniWeb.[/QUOTE] I'll ship you a box tomorrow. Oreo or Chips Ahoy?

Member Avatar for Dani
0
161
Member Avatar for aviavyne

[QUOTE=aviavyne;]Can anyone come up with a loop to read the the data from the file and read it into the dat?[/QUOTE] Yes we can. But it's [I]your[/I] task, not ours. You come up with the loop and if it doesn't work, we can help you fix it. But we aren't …

Member Avatar for WaltP
0
189
Member Avatar for Sniper rooney

[QUOTE=Sniper rooney;]please can anyone make a program in c language to convert a number from decimal to hexadecimal system using switch statements and please don't use arrays or %x[/QUOTE] Yes, many of us can. But since we aren't a free coding service, we won't. But we can HELP you do …

Member Avatar for WaltP
0
92
Member Avatar for faruq1407

By writing a program that creates that output. Did you bother to read the Member Rules as requested?

Member Avatar for seanbp
0
125
Member Avatar for flasp

Simply add one. A [I]char[/I] is simply a number output in a special way. B is the value 66, C is 67.

Member Avatar for flasp
0
142
Member Avatar for Vindal

[QUOTE=Vindal;]I keep getting location errors c4700 errors and a bunch of initializing errors Here is the full code again I really do not know how to fix this. [/QUOTE] Neither do we, since we don't know [I]what[/I] initialization errors there are, nor where. And c4700 doesn't mean anything to us …

Member Avatar for WaltP
0
578
Member Avatar for garevn

Like we said in your other post, you need to decide if you want to write a C program or a C++ program. [CODE] #include <iostream> // C++ #include <conio.h> // non-standard- don't use #include <stdio.h> // C #include <string.h> // C int delete= 0; char parname[20]; char valname[20]; FILE …

Member Avatar for WaltP
0
653
Member Avatar for lochnessmonster

[QUOTE=GuitarComet;]When you want your program to be portable[/QUOTE] Excuse me? Don't you mean [I][B]not[/B][/I] portable? You wouldn't use them. IMO, they are unnecessary.

Member Avatar for gerard4143
0
194
Member Avatar for garevn

[QUOTE=garevn;]I use c++ if u could provide some help i would appreciate thank you :)[/QUOTE] Then why are you posting in the C forum? :icon_rolleyes: We can't help you with C++ in the C forum.

Member Avatar for Trentacle
0
344
Member Avatar for LillianIs

You are passing a single character. [iCODE]atoi()[/iCODE] requires a character array (pointer)

Member Avatar for WaltP
-1
707
Member Avatar for dflor

[QUOTE=dflor;]I didn't understand [B]why[/B] for(...) at the beginning, a[i] has to be 0.[/QUOTE] Who says it [B]has to be[/B] 0? Test it. First thing in the program just print out the array.

Member Avatar for WaltP
0
334
Member Avatar for mocha8688

You are doing too much at one time. Take the program a setp at a time so you can understand completely what you are doing. First, read the file and output what is read. No more. Then [QUOTE=mocha8688;]1. count number of words in file[/quote] Get that running completely (and properly) …

Member Avatar for WaltP
0
145
Member Avatar for Dani

[QUOTE=cscgal;]Here's an example of what the page looks for blud, our sysadmin: [url]http://www.daniweb.com/certificates/stats.php?u=6790[/url] He has a respectable 546 posts under his belt and has solved 18 threads to rank #420 for solving threads. But it might be encouragement for him to see that he only needs to solve two more …

Member Avatar for peter_budo
3
675
Member Avatar for frankchester

What you're asking doesn't make sense. [QUOTE=frankchester;]I'm aware you can use putchar() but that doesn't really work so well for what I'm doing, [/quote] Why? Are you trying to output a character and it's outputting a flower? Maybe you need to be more explicit so we can understand what you're …

Member Avatar for bambrah jai
0
160
Member Avatar for Vindal

[code] const int DAYS = 7; const int TEMPS = 2; for (int days = 0; days < 7; days ++) { cout << "Enter High Temp for day " << days + 1 << ": "; cin >> xTemps[DAYS][TEMPS]; // This always loads xTemps[7][2] -- // which does not …

Member Avatar for Vindal
0
2K
Member Avatar for dinners

Two floating or double values are rarely equal. You have to test for a range -- maybe within 0.001 tolerance. [CODE]if ABS(val1 - val2) > 0.001) // check if close to equal[/CODE]

Member Avatar for dinners
0
87
Member Avatar for Wolf CCMLG

You already check to see if the word has 3-6 characters. Also check for an ' too before inserting the word.

Member Avatar for Wolf CCMLG
0
230
Member Avatar for flasp

First, after entering the number, calculate the number of days. With what's left after removing the number of days from the number, calculate the number of hours. Keep going until you get the seconds.

Member Avatar for Jason Giggs
0
180
Member Avatar for bflack

[QUOTE=bflack;]//Why did the compiler treat it as a function...[/QUOTE] Because it IS a function. [QUOTE=bflack;]... and are the header files lacking or what?[/QUOTE] No, you are lacking the header file. But why do you want to use a non-standard C function when a standard C++ function works just fine? Use …

Member Avatar for WaltP
0
464
Member Avatar for Leppie

Who's teaching these people computer lingo???? [QUOTE=Leppie;]My program runs a three dimensional maze (3x3x3 = 27 locations)...[/quote] No, it [I]creates[/I] a maze. It doesn't [I]run[/I] anything. [QUOTE=Leppie;]... the start and exit rooms show up on the run compiled program ...[/quote] A "[I]run compiled program[/I]?" What the heck does that mean? …

Member Avatar for Leppie
0
149

The End.