5,676 Posted Topics

Member Avatar for sahil_itprof

[QUOTE=sahil_itprof;558012]I m talking about all the programs i have made and I use Turbo C compiler... I am appending the whole code...... Check it out...[/QUOTE] No way. You didn't use CODE tags which are mentioned 1) In [B]The Rules[/B] you read when you signed up 2) In the post aptly …

Member Avatar for sahil_itprof
0
115
Member Avatar for WaltP

What happened to the ICODE button in C/C++? Could you please add it back, and on the quick reply, too? It would be nice to have a keystroke for it, also. Pretty pleaseeee??? ([I]batting my eyelashes coyly[/I])

Member Avatar for Dani
0
162
Member Avatar for wollacott

[QUOTE=wollacott;559616] i need to know how to clear screen and also how to get the numeric keys without pressing enter. [/QUOTE] Both of those questions are answered in your post. You might want to reread it and look up the things suggested. And while you're at it. [url=http://www.gidnetwork.com/b-38.html]look this up[/url], …

Member Avatar for jephthah
0
268
Member Avatar for digital_ice7

Change [icode]cin >> variable[/icode] to [icode]cin.getline(variable)[/icode] And use full words in English as [B]the Rules[/B] specify. You [I]did[/I] read them, didn't you?

Member Avatar for skatamatic
0
123
Member Avatar for purepecha
Member Avatar for mattyd

[QUOTE=~s.o.s~;279484]Never used IE, always use FF. Personally what I feel is that IE sucks...(atleast IE6).[/QUOTE] How can you say this? You've never used it so what is your opinion worth? :twisted: I haven't upgraded to IE7 yet (downloading now), but FF is my browser of choice, with IE available for …

Member Avatar for GrimJack
0
374
Member Avatar for dan9992

[QUOTE=dan9992;557869]Ive sorted that problem but how can i read the persons name and write it to a txt file and then read the company name and write it? Also i need to output a " to a text file how do i do this?[/QUOTE] Maybe by having the company name …

Member Avatar for dan9992
0
84
Member Avatar for Xerema

You need to un-nest your [icode]if[/icode] statements. You need to rethink your code some. What you need to do is take each individual process (input, calculation, output, etc) as individual steps. What you [I]have[/I] is each step integrated (merged) into the previous step. Separate them into input, calculation, output, and …

Member Avatar for samer.daur
0
98
Member Avatar for gallantmon1

In this case, no. A [ICODE]switch [/ICODE]statement relies on different [ICODE]case [/ICODE]statement values and your [ICODE]if [/ICODE]statements do not have different values. One problem I see in your [ICODE]if [/ICODE]structure is what if 5 of the values in fact match [I]set[/I]. This will only find 1 and stop. This may …

Member Avatar for WaltP
0
119
Member Avatar for heidigjr

[CODE=c] char *string1[100000], *string2[100000]; // You just created // an arrayof 100000 POINTERs not a // string of 100000 characters int a, b, c, count1[27], count2[27], m, no; int main () { for (m=0; m<=26; m++){ count1[m]=0; // Now you set all the POINTERs to 0 count2[m]=0; } gets(*string1); // …

Member Avatar for WaltP
0
100
Member Avatar for sanjayk1241@yah

[QUOTE=sanjayk1241@yah;558730]Hi, I am using Borland C Compiler for preprocessing a source file. I am using the following command for preprocessing.... C:\cpp32.exe -P- -o"outputfilename" "Sourcefilename" According to my requirement i should get source file comments into preprocessed file. The above command is not satisfying my requirement. I don't which options i …

Member Avatar for mitrmkar
0
191
Member Avatar for newport

[QUOTE=newport;558121]I'm not sure how to combine the use of bubble sorting and c I/O functions. After opening the file, I don't know how to read the contents.[/QUOTE] Do you have a book? If so, there's a chapter on I/O (input and output). Might want to read that. if you don't …

Member Avatar for jephthah
0
110
Member Avatar for spec80

[QUOTE=spec80;557804]My problem is that i do not know how to update the memory locations[/quote] It sounds like your instructor wants you to use [I][B]global variables[/B][/I] for [I]rootone[/i] and [i]roottwo[/I]. Check with him to see if that's true. [QUOTE=spec80;557804]to write into an output file without overwriting what is already there from …

Member Avatar for jephthah
0
173
Member Avatar for Jennifer84

[QUOTE=VernonDozier;558658]Not bad, I didn't realize that function existed. I thought you had to write your own![/QUOTE] If the purpose of the program is to teach you how to calculate an average, you [I]do[/I] need to write your own.

Member Avatar for Jennifer84
0
194
Member Avatar for barbiegirl

[QUOTE=Majestics;557051]It will Help you ![/QUOTE] Why this is bad help: 1) No CODE tags 2) No formatting, code is very difficult to read. [url=http://www.gidnetwork.com/b-38.html]See this[/url] 3) [ICODE]#include<conio.h>[/icode] -- not portable. Do not use. 4) [ICODE]void main()[/ICODE] -- [url=http://www.gidnetwork.com/b-66.html]see this[/url] 5) [ICODE]clrscr();[/ICODE] -- only 1 compiler defines this function - do …

Member Avatar for barbiegirl
0
195
Member Avatar for sfurlow2

Try what you [I]are[/I] sure of, and attempt what you can't. Then post what you tried and we can help you fix it if you have problems.

Member Avatar for WaltP
0
74
Member Avatar for hjjayakrishnan

Or you can use an equation to get what you want. in your example you specify 3,5,7,9 so: [code] n = rand() % 4; // get numbers 0,1,2,3 n *= 2; // make them now 0,2,4,6 n += 3; // offset them to 3,5,7,9 [/code]

Member Avatar for WaltP
0
65
Member Avatar for nurulshidanoni

[QUOTE=vmanes;558535]A little more information, please. What are you trying to output? Do you have particular formatting requirements (spaces, decimal precision, etc.)? Please show the code you have so far, and tell us what you are having trouble with, in a more specific manner. Then we will be able to give …

Member Avatar for WaltP
0
67
Member Avatar for langzhen

The best place to put the calculation is after you've read the data used in the calculation. The best place to output the answers is after you've done the calculations. And you need to use CODE tags as described in [B]The Rules[/B] you read when you signed up. Did you …

Member Avatar for langzhen
0
119
Member Avatar for Code.n00b

[QUOTE=Code.n00b;557228]i cant seem to figure out are how to accept a user input to start and stop the gas pumping loop and how to pause the loop at the start so that it appears to "zero out" before pumping gas. [/QUOTE] Aren't you supposed to enter the amount of gas …

Member Avatar for WaltP
0
121
Member Avatar for afg_91320
Member Avatar for WaltP
0
95
Member Avatar for ngozinyeusi

[QUOTE=ngozinyeusi;557824]im a biginner level in Visual C++ version 6.0 "how can i Write the Program ”Minesweeper”. [/QUOTE] You don't. That is not a program for a beginner. Start with something easy like craps or tic-tac-toe.

Member Avatar for Lerner
0
229
Member Avatar for artisabang

[QUOTE=Ancient Dragon;557589]Although correct, I have never seen such an operating system, but there could be one or more very obscure os's that have that quality.[/QUOTE] Which is why you can ignore this advice. I've never seen (at least in the past 25 years) a system that a student uses that …

Member Avatar for WaltP
0
10K
Member Avatar for bwjones
Member Avatar for WaltP
0
101
Member Avatar for JerryShaw

[QUOTE=cscgal;545864]Ad campaigns cannot simply be removed. Each campaign is often the result of weeks of negotiations resulting in signed contracts.[/QUOTE] Since that is so, maybe a requirement that the add is non-intrusive be added to each contract so you can better control the [I]working[/I] of your site. And while you're …

Member Avatar for Dani
0
176
Member Avatar for heshangho

Yes, a [I]while[/I] loop would work, or better yet a [I]do-while[/I].

Member Avatar for heshangho
0
142
Member Avatar for curt1203

Don't try to do it all at once. First, check for the negative sign. Make sure there is only one and it's first. Then check for one decimal. Last, check that there are only digits, decimal and negative signs in the input.

Member Avatar for curt1203
0
115
Member Avatar for TMD

[QUOTE=Joatmon;554792]system pause seems to be frowned upon anyway, but the best replacement (if you don't care about portability) could just be to use #include <conio.h> // windows only, for getch cout << "Press any key to continue."' getch(); //waits until one key is pressed[/QUOTE] A terrible suggestion. Why suggest a …

Member Avatar for Joatmon
0
76
Member Avatar for nelledawg

Please explain this line: [icode]scanf("%lf%*c", &y);[/icode] It makes no sense with the format specifier you have.

Member Avatar for WaltP
0
132
Member Avatar for Rashakil Fol

I've loved the Dick Van Dyke Show since it started. And I think he's great is most things I've seen him in! But until you mentioned it, I never made this connection! :icon_eek:

Member Avatar for MidiMagic
1
235
Member Avatar for LanierWexford

I would also suggest better formatting. [url=http://www.gidnetwork.com/b-38.html]See this[/url] and pay particular attention to the [B]Indentation[/B] section. As it is your code is very difficult to follow.

Member Avatar for chalasesha
0
163
Member Avatar for heshangho
Member Avatar for midimatt

It's because you can't create a buffer using a variable as the size: [Code=c] int buffer = 11; char name[buffer]; [/code] You need something like: [Code=c] #include <string.h> #include <stdio.h> #include "input.c" #define BUFFERSIZE 11 FILE *playerdata; int main(void) { char name[BUFFERSIZE]; printf("Please Enter Your Name\n"); printf("Maximum Length 10 characters\n"); …

Member Avatar for WaltP
-1
376
Member Avatar for wonder_laptop

First of all, use CODE tags as explained in the [I]Community Rules[/I] you read when you joined. [code=c] #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <errno.h> void main(int argc, char *argv[]) // argc=#of parameters // argv=array of strings for each parameter { int status; char *prog = argv[0]; // first …

Member Avatar for wonder_laptop
0
124
Member Avatar for Joatmon

We need to see code in order to figure out what's happening. Isolate the problem by creating a small version of the program that exhibits the same problem. Copy your program and start removing sections of code you know does not cause the problem -- piece by piece. When you …

Member Avatar for Joatmon
0
118
Member Avatar for hockeyplayer051

As [B]hockeyplayer[/B] suggests, read a line at a time. Then use [ICODE].find()[/ICODE] to locate the @ if present. If you find it, set up 2 loops: Loop 1 tests each character before the @ to find the first character that is illegal in an email address (such as the ']') …

Member Avatar for vijayan121
0
119
Member Avatar for nurulshidanoni

When are you going to learn to explain what you want in understandable terms? "[I]I want to call (3,1) then (3,13), then (3,34)..........[/I]" means what? What does "call" mean? "[I]How to declare 3 is the first than 13 is second?[/I]" is also meaningless. The first what? The second what? Give …

Member Avatar for WaltP
0
86
Member Avatar for liukinhei

Please [url=http://www.gidnetwork.com/b-38.html]format your code[/url]. We need to be able to follow it in order to be able to help. And reading [url=http://www.daniweb.com/techtalkforums/thread78223.html]this[/url] will help you give us the info we need.

Member Avatar for midimatt
0
116
Member Avatar for fiz hafiz

When you read the [B]Community Rules[/B], what part of [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_organized]this rule[/url] did you not understand?

Member Avatar for WaltP
0
93
Member Avatar for Samadhi69

[QUOTE=Samadhi69;550523]The main thing I'm not sure of is how to step through the list like I would with java.[/quote] Stepping through the list is done by calling [ICODE]getFirst()[/ICODE] which, I assume, returns the first node in the list. Then passing that node into [ICODE]getRest()[/ICODE] returns the next node. Keep calling …

Member Avatar for WaltP
0
108
Member Avatar for jeffige

[B]abhikkumarbasu[/B], it would really help if you'd read the threads you are responding in. He very definitely said he's using [I]DevC++[/I]. And I've seen other posts that you've offered the exact same advice as the post immediately before you -- and hours earlier. We appreciate you desire to help and …

Member Avatar for Ancient Dragon
0
134
Member Avatar for IAmPat

And [url=http://www.gidnetwork.com/b-38.html]format your code[/url]. It's too hard to follow with inconsistent spacing.

Member Avatar for mitrmkar
0
159
Member Avatar for Joatmon

You're looking for [icode]kbhit()[/icode], the fraterna; twin brother to [icode]getch()[/icode]

Member Avatar for Joatmon
0
333
Member Avatar for zmnaiaj30

You forgot [url=http://www.natural-innovations.com/computing/asciiebcdic.html]EBCDIC[/url] :icon_wink:

Member Avatar for Ancient Dragon
0
124
Member Avatar for SofMy

[QUOTE=carnage;550192]//edit: sorry for the double post.[/QUOTE] If you don't want want to double post, you can [I]edit[/I] your first post. But double posting is not a problem if you have additional information. It's [I]bumping[/I] we frown on.

Member Avatar for mitrmkar
0
126
Member Avatar for carnage

There is so much wrong here!!! Both of you, please [url=http://www.gidnetwork.com/b-56.html]read this about gets()[/url]. This loop (reformatted for readability):[code=cpp] # for (n = 0; n < 11; n++) { if (strncmp(one[n],"xxxx xxxx",10) != 0 && strncmp(two[n],"x,xx xxx.",10) != 0) { cout<<"Mismatch"; } } [/code] has the following problems: 1) the …

Member Avatar for hammerhead
0
145
Member Avatar for PaKmAn

Use the [ICODE]toupper()[/ICODE] function from [I]ctype.h[/I]: [code=cpp]else if (toupper(userPlay) == 'P' && toupper(cPlay) == 'R')[/code] Also, you should only call [ICODE]srand()[/ICODE] once, so move it to the beginning of [ICODE]main()[/ICODE]

Member Avatar for WaltP
0
119
Member Avatar for jer_stud56
Member Avatar for jer_stud56
0
88
Member Avatar for joshmo

Also, please read [url=http://www.gidnetwork.com/b-59.html]this series[/url] on [ICODE]scanf()[/ICODE], especially the character and string entries.

Member Avatar for joshmo
0
105
Member Avatar for purplestar86

Or with only one button: [code=vb] Dim StartTime As Date ' Private Sub cmdStart_Click() if StartTime = 0 then StartTime = Now cmdStart.caption = "Stop Timer" else MsgBox DateDiff("s", StartTime, EndTime) StartTime = 0 cmdStart.caption = "Start Timer" end if End Sub [/code] If course you can store the difference …

Member Avatar for Jx_Man
0
254

The End.