5,676 Posted Topics

Member Avatar for torbecire

Standard C/C++ does not allow you to type and not echo the characters. Input is buffered which means you type and the system stores the characters until the ENTER is pressed. [I]Then[/I] your program reads the characters. Some -- but not all -- compilers have a way around this, but …

Member Avatar for WaltP
0
100
Member Avatar for bananenflip

[QUOTE=bananenflip;321378]It's German Finnish French Dutch Dutch. Or Deutsch Suomi France Nederlands Nederlands. Guess what's my mother language[/QUOTE] Swahili? :mrgreen:

Member Avatar for bananenflip
0
302
Member Avatar for ajay kandari

[B]Aia[/B], what did you just post? No explanation, no formatting, improper programming practices ([INLINECODE]void main()[/INLINECODE], [INLINECODE]getch()[/INLINECODE], [INLINECODE]clrscr()[/INLINECODE]) You should model good practices and proper techniques. You seem to have been here long enough to know this... ;)

Member Avatar for Salem
0
402
Member Avatar for John A

[QUOTE=cscgal;320587]The post editing works just fine for me? Does it happen for you all the time? I would suspect that if it was a sitewide problem then some of the moderators would have brought it to my attention already.[/quote] It happened once to me a couple hours ago, but I …

Member Avatar for WaltP
0
209
Member Avatar for bananenflip

[QUOTE=Lerner;321316]I still don't understand what you want to do. [/QUOTE] I agree. You may be skilled in HTML and CSS, but this is a C/C++ board. You post code here, not HTML/CSS markup language.

Member Avatar for WaltP
0
89
Member Avatar for chubbywubba

More indentation is needed. Please use 3-4 spaces. 1 is not enough. I'm not going to search through 580 lines of code, so I can only suggest you look at the output and make sure you have a RETURN at the end of each line. That's what it looks like. …

Member Avatar for WaltP
0
86
Member Avatar for terp410

> Whatever code-coloring method you're using, please stop it. Instead use [code tags](http://www.daniweb.com/techtalkforums/announcement8-3.html) which are immensly better, and have coloring built-in if you use (code=language) And [Format your code!!!!!](http://www.gidnetwork.com/b-38.html) Slamming everything to the left edge makes the code impossible to read!

Member Avatar for terp410
0
1K
Member Avatar for arfmal

Use [INLINECODE]getline()[/INLINECODE] to read the entire line and break it into it's pieces.

Member Avatar for Lerner
0
163
Member Avatar for Virii

[QUOTE=ithelp;321129]Very few company work on robotics, so your scope would be limited and who said the work is very challenging , you have to maintain millions of lines of software code only and which is ofcourse boring do not expect you will be asked to design at the first day.[/QUOTE] …

Member Avatar for ithelp
0
368
Member Avatar for ikix

It's a convoluted way of clearing the input buffer of characters left after the previous read. When you read a number using[INLINECODE]cin[/INLINECODE], the characters after the number are left in the buffer for the nect [INLINECODE]cin[/INLINECODE] to read. That basically means the ENTER is still there, and when you attempt …

Member Avatar for John A
0
128
Member Avatar for kansmish82

plzzzzzzzzzzz read the forum rules, especially [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_organized]thread titles & homework requests[/url] (you want [I]us[/I] to finish it for you?) [url=http://www.daniweb.com/techtalkforums/announcement8-3.html]Code Tags[/url] and [url=http://www.gidnetwork.com/b-38.html]Formatting C / C++ code[/url] (you want us to [I]read[/I] your code?)

Member Avatar for WaltP
0
152
Member Avatar for varsha_saxena

Do you want us to give you an algorithm or help you fix one you've already got? If [I]give[/I], [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_organized]read this[/url]. If [I]fix[/I], we're not psychic. Whatcha got?

Member Avatar for varsha_saxena
0
114
Member Avatar for JaksLax

[QUOTE=JaksLax;319479]I must be looking at this completely wrong because to me it looks like you pass the sum and cBit into the function, but I though that is what the function is suppose to produce. [/quote] [I]sum[/I] and [I]cbit[/I] are values returned back to the calling function. Your function will …

Member Avatar for JaksLax
0
237
Member Avatar for abhijit11

[QUOTE=kansmish82;319883]hey, how bout if u try to make it outtextxy(13,13,"a") instead......this function, as far as i know doesn't work without quotes.......[/QUOTE] [QUOTE=Colin Mac;319404]I think it might be. outtextxy(13,13,"a")[/QUOTE] All you need to do is read his request: [QUOTE=abhijit11;319332]Now am trying to display something the user enters onto the graphics screen. …

Member Avatar for Colin Mac
0
198
Member Avatar for bigben09

[QUOTE=bigben09;319440]ok my program works the only thing i cant figure out how to do is, print the sum, [/quote] Maybe you can use [INLINECODE]cout <<"The sum of the numbers is : " << sum << endl;[/INLINECODE] ;) [QUOTE=bigben09;319440]... average [/quote] Average is [I]sum / #-of-values[/I] [QUOTE=bigben09;319443]ok i got the numbers …

Member Avatar for WaltP
0
118
Member Avatar for hui

#1: You don't need to double space everything. It's too hard to read. #2: You need to indent consistently, and 3-4 spaces, not 1 or 2 #3: "[I]it is bringing some bit of a problem[/I]" has no meaning. [I]What[/I] is the problem. Describe it, don't make us guess.

Member Avatar for Ancient Dragon
0
205
Member Avatar for waynewilson1

[QUOTE=waynewilson1;319259][QUOTE=Ancient Dragon;316340]>>if anybody knows how to check text for a specific string and then change it or create a message box(ie. swear detecter) If you are looking for a way to detect obscene language, you might ask Dani because she implemented something similar for DaniWeb a couple months ago. I …

Member Avatar for WaltP
0
104
Member Avatar for boujibabe

[QUOTE=boujibabe;318565]Heres the code I know the indention is terrible but hopefully u would understand:[/QUOTE] Then why not take 30 seconds and make it neat so we don't have to struggle to understand the code. Don't post terribly formatted code you know is bad -- fix it! :rolleyes:

Member Avatar for WaltP
0
133
Member Avatar for belhifet

First of all, you'll have to figure out how to read a character at a time (without the need for ENTER) which is not standard. I think GCC can do it but you'll have to figure it out yourself. Then you'll have to grab the name of each file in …

Member Avatar for WaltP
0
118
Member Avatar for earlyriser

[QUOTE=joeprogrammer;316927]If you're going to use char arrays, you might as well be using C. And no, I know it's not your fault, so I blame your teacher for that.[/QUOTE] Seems to me the concept here is to learn to process c-strings, because they are necessary in C++. [B]earlyriser[/B], stop using …

Member Avatar for ~s.o.s~
0
290
Member Avatar for bigben09

For right now don't worry about it. Verification of input will probably be later in the course.

Member Avatar for John A
0
128
Member Avatar for donaldunca

[QUOTE=donaldunca;311007]But I don't know how to read file "data.inp" line by line. I think I should use fgets, but seem that fgets is used for char. [/QUOTE] Yes, use [I]fgets()[/I] to read the line, then you can use [I]sscanf()[/I] to convert the line into numbers.

Member Avatar for donaldunca
0
231
Member Avatar for davew23901

[QUOTE=davew23901;317027]Never done this before, but here goes... I write VB6 applications and have had little problem installing them on computers at office sites scattered across the country. Now the IT people are putting the clamps down on "non approved" apps and will not give anyone admin rights to the pcs. …

Member Avatar for mjwest10
0
130
Member Avatar for darkmessenger

[QUOTE=dovb;308030]Did you get your simple password system working? I have a similar task: I want certain passwords to open form A and certain passwords to open form B.\ Can you help?[/QUOTE] Start a new thread (since this one is [B]darkmessenger[/B]'s) and explain in detail what you need.

Member Avatar for mjwest10
0
179
Member Avatar for boujibabe

[QUOTE=boujibabe;314663]I been trying to work on my indentation and I thought I was getting better [/QUOTE] [url=http://www.gidnetwork.com/b-38.html]Here's a tutorial[/url] about code formatting. Concentrate on [I]whitespace[/I] as well as indentation. A differnt IDE won't do it all for you, and knowing [I]how[/I] to format is extremely important.

Member Avatar for boujibabe
0
279
Member Avatar for tech291083

[QUOTE=tech291083;316765] If you are an addicted ebayer then: [URL]http://www.youtube.com/watch?v=jCIp7eo4MvY[/URL][/QUOTE] The Original: [url]http://www.youtube.com/watch?v=lQTFdrZFI2g&mode=related&search=[/url]

Member Avatar for tech291083
0
105
Member Avatar for Duki

[code=c] switch (xactCode) { case 'D': case 'd': bal += xactAmt ; depAmt += xactAmt ; totDep++ ; case 'I': case 'i': bal += xactAmt ; intPaid += xactAmt ; case 'W': case 'w': bal -= xactAmt ; wdAmt += xactAmt ; totWd++ ; if ((bal < MIN_BAL) && (svcChgd …

Member Avatar for Duki
0
172
Member Avatar for Marks256

If you don't want to be bogged down with M$, go with C or C++. They are more general and not 'controlled' by M$

Member Avatar for Marks256
0
411
Member Avatar for Duki

How about: Read a string as ~sos~ suggests. Convert the string to int If it a valid value, use it, else output error

Member Avatar for WaltP
0
304
Member Avatar for turquoise

[QUOTE=Scling;316523][QUOTE=turquoise;75611]i am just taking this class for one semester but i need help..am i doing this right at all? or should i redo it in another way thank you suroot. ~Fara [I]Posted on Dec 14th [B]2004[/B][/I][/QUOTE] I created a seperate subprogram for each player for most aspects of the game. …

Member Avatar for mjwest10
0
618
Member Avatar for Lazaro Claiborn

Easiest is to pass in the position of the last move then check each direction from that location for 3 in a row.

Member Avatar for Lazaro Claiborn
0
469
Member Avatar for The Dude

But it's yogurt! If I want spoiled milk I'd just leave it in the fridge for a while.

Member Avatar for Ancient Dragon
0
108
Member Avatar for jbennet

To get over your clown phobia, watch "[I]Killer Clowns from Outer Space[/I]" as soon as possible!

Member Avatar for maui_mallard
0
243
Member Avatar for kobi

[QUOTE=Ancient Dragon;314513]Because in such a trivial program it doesn't make a hill of beams which way its coded. Creating another process is also trivial in most of today's computers; the os would barely even know the process is present in the system.[/QUOTE] All this is true, but aren't we forgetting …

Member Avatar for Ancient Dragon
0
393
Member Avatar for Rickenbacker360

> Hey again, I was hoping someone here could look at my code and tell me why I'm not receiving the correct output. > > Here's what I'm supposed to do:Write a program that asks a user to enter an integer, say n,then list all the numbers that are less …

Member Avatar for psycotic_furby
0
123
Member Avatar for royaloba

So what's the problem? You should describe what's wrong so we know what were looking for.

Member Avatar for royaloba
0
844
Member Avatar for Dani

I think this is a great idea, but 3 pages of new posts, most of which I'm not interested in perusing at the moment makes it somewhat unwieldly. If they can be sorted by FORUM-INDEX + FORUM + TIME it might be easier to use since I for one go …

Member Avatar for Ancient Dragon
0
210
Member Avatar for Mrclean8586
Member Avatar for varun.coolmax
Re: Vb 6

And what's our incentive to read 320 lines which inlcudes "[I]Extra shit load added for crappy fun[/I]"? Maybe you should post the section you are having trouble with...

Member Avatar for varun.coolmax
0
117
Member Avatar for elcrapo

[QUOTE=elcrapo;315275]I am having troubles getting this program to generate random numbers. Right now i have it set up to only generate 1 and 19. I do not know how to generate random numbers. thank you if anyone can help my dumbass.[/quote] change [INLINECODE]a = lowest+int(range*rand()/(RAND_MAX + 1.0));[/INLINECODE] to [INLINECODE]a = …

Member Avatar for WaltP
0
141
Member Avatar for cusado

[QUOTE=cusado;314537]the program runs, but no output file is generated? am i missing a command still? [code=c] #include <stdio.h> #include <string.h> #include <ctype.h> int main(int argc, char *argv[]) { char line[255]; fgets(line, 255, stdin); char filename[80]; // This line can't be here. It has to // be above all executable code …

Member Avatar for Lazaro Claiborn
0
244
Member Avatar for maui_mallard
Member Avatar for maui_mallard
0
88
Member Avatar for joy_vb

It doesn't appear so. I there there was a FORECOLOR property but there isn't -- at least not for buttons. Weird. Leave it to M$ to forget a useful property. I did find [url=http://vbnet.mvps.org/index.html?code/intrinsic/buttoncolorcheck.htm]this solution[/url] doing a Google search for [b]vb "command button" color[/b]. Maybe you'll find other options.

Member Avatar for WaltP
0
104
Member Avatar for degamer106

As mentioned, use [INLINECODE]getline()[/INLINECODE] to read the input. Test the first character and if it's '\n', only a RETURN was entered. Otherwise process the line 'cuz something useful (hopefully) was entered.

Member Avatar for WaltP
0
4K
Member Avatar for raydogg57

Also, this piece of code has a BIG problem: [code=c] for (int i = 0; i < 10 && z(); i++) { char* temp = new char;//[500]; cin.getline(temp, 500); [/code] How large is the area pointed to by [I]temp[/I]? I'm surprised it didn't crash on you yet. [QUOTE=raydogg57;314355]I was also …

Member Avatar for WaltP
0
554
Member Avatar for sendoshin

This might work... Set the form to [url=http://msdn2.microsoft.com/en-us/library/czke9azk(VS.80).aspx]transparent background[/url] and maximize the window.

Member Avatar for sendoshin
0
121
Member Avatar for Matt Tacular

Do you know what [I]arrays[/I] are? Do you know the [I]if[/I] statement? Do you know the [I]for[/I] statement? Post your code after reading [url=http://www.daniweb.com/techtalkforums/announcement8-3.html]this[/url] and we can help.

Member Avatar for Matt Tacular
0
82
Member Avatar for bigben09

Also, look at [B]Joe[/B]'s suggestion about the array. It will make your code extremely simple.

Member Avatar for bigben09
0
3K
Member Avatar for tatumkay

Basically, you have to turn the description into a set of quations. This has nothing to do with C++, yet. [QUOTE=tatumkay;313662] 2. A government research lab has concluded that an artificial sweetener commonly used in diet soda will cause death in laboratory mice. A friend of yours is desperate to …

Member Avatar for Ravalon
0
173
Member Avatar for The Dude

[QUOTE=The Dude;311418][url]www.something.com[/url][/QUOTE] $35 a year down the drain....

Member Avatar for WaltP
0
78

The End.