5,676 Posted Topics

Member Avatar for Sturm

[QUOTE=Sturm;475190]So I guess it's somehow [I]my[/I] problem?[/QUOTE] No necessarily [I]your[/I]s. It's probably Opera's.

Member Avatar for zippie
0
182
Member Avatar for valdix

Neither do we. You didn't tell us why you think it's wrong. Did you miss the post titled [url=http://www.daniweb.com/techtalkforums/thread78223.html][b]Read Me:[/b] Read This Before Posting[/url]?

Member Avatar for Salem
0
156
Member Avatar for wambooman

[QUOTE=wambooman;475220] What happens is that the getline gets the information from the previous cin. so say I cin hello world hello world, my cout will give me world~10hello~10world+garbage. any reasons why?[/QUOTE] There is no previous [ICODE]cin[/ICODE] so we can't tell. We also don't know whether [I]SA[/I] is a c-string, C++string, …

Member Avatar for Duoas
0
125
Member Avatar for Ken JS

Depends on the reason. If you want to play it, read it with an .avi player, like Windows Media Player. If you want to look at the totally unreadable contents (except the header), open it as a binary file and read it as bytes.

Member Avatar for WaltP
0
115
Member Avatar for danejar

[QUOTE=danejar;470243]Hello, I don't know bandit_77, but I am also trying to write the exact program that he requested help on. I doubt I know as much as the original poster because I am very new to programming. So the answer to the "goldilocks" problem is, ""Woah, back up Einstein, I'm …

Member Avatar for Nick Evan
0
130
Member Avatar for brlukosk

[QUOTE=brlukosk;474667]Hello all! New here at daniweb. I am working on a function to check the validity of a sudoku puzzle. It must check the 9x9 matrix to make sure it follows the rules and is a valid sudoku puzzle. this is what I have come up with so far: ... …

Member Avatar for brlukosk
0
4K
Member Avatar for DamiLeon

Another thing to consider, what if the user enters 15 characters? All you read are the first 9 and he thinks his password is longer than it is. You should probably accept more characters and give an error if 10 or more are entered.

Member Avatar for wambooman
0
84
Member Avatar for mrgreen108

Search the string for the character. If found, replace the character with '\0'. Ta Daaaa!

Member Avatar for vmanes
0
121
Member Avatar for jrice528

If you learn now to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] you will discover it's easier to find errors and your code will be easier to read. This is [I]very[/I] worthwhile when you get to more complex programs. It also helps us understand your code.

Member Avatar for jrice528
0
110
Member Avatar for xeto

[QUOTE=xeto;474220]I have a palindrome program.Is there a way to ensure user input terminated in a string by a punctuation mark (e.g. ‘!’, ‘.’, or ‘?’.) in an array? [/QUOTE] Get the length or the string, check the last character with the function [ICODE]ispunct()[/ICODE] [QUOTE=xeto;474220]And how do i get the program …

Member Avatar for WaltP
0
338
Member Avatar for tofwono

On [I]what[/I] above? There is no post above this one! And try reading the RULES as recommended multiple times during your registration here, as well as the post at the top of the forum clearly titled "[I][b]Read Me:[/b] Read This Before Posting[/I]". Notice the wording -- [B]before posting[/B].

Member Avatar for WaltP
0
252
Member Avatar for Jishnu

Turbo C Ver 1 also prints, so it's probably a bug at least through ver 3. Borland 5.5 works as expected.

Member Avatar for WaltP
0
98
Member Avatar for cuddlerbes
Member Avatar for vmanes
0
86
Member Avatar for Dvb701

[QUOTE=Dvb701;474034]i cant seem to figure out how to write the void function void (searchRecords() ) of Search for matching records tried numerous things, what i need it to do is just search for a record and display it to the user how many matches found, thanks in advance for any …

Member Avatar for WaltP
0
125
Member Avatar for malathuis

Please post [url=http://www.gidnetwork.com/b-38.html]formatted code[/url] so it can be followed and understood. It will help you in the long run.

Member Avatar for ravenous
0
60
Member Avatar for Butterflieq

[QUOTE=Butterflieq;473247]When writing my pseudocode I declare my variables in a module called housekeeping(). We are currently working on reading input from a file or files rather than asking the user directly for input. I am a bit confused how this might work with my pseudocode though. I know how I …

Member Avatar for Butterflieq
0
234
Member Avatar for sugarflaps

[QUOTE=sugarflaps;473454]Hi It does compile but it doesnt do what i want it to do i want to create a 2d array using the black and grey blocks from the ascii code with each dn value being either grey or black.[/QUOTE] Most of us aren't psychic here. You need to tell …

Member Avatar for WaltP
0
282
Member Avatar for joshua.tilson

[QUOTE=Duoas;472960]There is nothing wrong with using a system program to clear the screen. It is simple and you can count on "cls" or "clear" being present on most systems. [/QUOTE] Totally disagree. #1) [I]Which[/I] is it going to be? And how do you write portability with multiple choices like this? …

Member Avatar for Duoas
0
343
Member Avatar for kano
Re: more

Please read the rules as suggested when you registered so you can post an intelligently worded question. And based on [url=http://www.daniweb.com/forums/post473329.html#post473329]this post[/url] you can probably figure out what the answer is... :icon_rolleyes:

Member Avatar for WaltP
-1
64
Member Avatar for TAboy24

Start a loop Output the menu Accept the selection Based on the selection, do the appropriate task. (Don't forget an exit selection) End of loop Did you bother to read the rules, especially the CODE TAG information?

Member Avatar for ithelp
0
77
Member Avatar for kadeemdagreat
Member Avatar for WaltP
0
219
Member Avatar for kiel19

[QUOTE=kiel19;472922]teach me how to format my program befor posting[/QUOTE] [url=http://www.gidnetwork.com/b-38.html]Here you go[/url] You might also try the post titled [url=http://www.daniweb.com/techtalkforums/thread78223.html][b]Read Me:[/b] Read This Before Posting[/url] as well as [url=http://www.daniweb.com/techtalkforums/announcement8-3.html]this announcement[/url]

Member Avatar for WaltP
0
743
Member Avatar for lubi_iit
Member Avatar for kalki
Member Avatar for c4swimmers_net
Member Avatar for Salem
0
125
Member Avatar for carlarolan
Member Avatar for carlarolan

Yes, it's a plan. It's basically like a blueprint that you follow to actually write the program. It makes programming easier and faster.

Member Avatar for carlarolan
0
104
Member Avatar for Blythe24

How many times during registration were you pointed to [I]The Rules[/I]? Why would you ignore them? When reading an integer, [ICODE]cin[/ICODE] leaves the \n in the buffer. The next [ICODE]cin[/ICODE] sees that and continues on thinking it was his. You have to clear the input stream before reading strings if …

Member Avatar for Blythe24
0
149
Member Avatar for jbstin

Also: [ICODE]#include<iostream.h>[/ICODE] -- old header that shouldn't be used for the past umpteen years [ICODE]#include<conio.h>[/ICODE] -- header that should not be used as it's not portable [ICODE]void main()[/ICODE] -- [I]main()[/I] has NEVER been a [I]void[/I], always an [I]int[/I], [url=http://www.gidnetwork.com/b-66.html]see this[/url] [ICODE]clrscr();[/ICODE] -- useless function only defined in 1 old compiler, …

Member Avatar for vijayan121
0
226
Member Avatar for towhoe260

[QUOTE=towhoe260;472358]How do i go about getting a table in there. we have not covered this in class.[/QUOTE] Then it's not something you want to do. It's not easy at your level of experience.

Member Avatar for WaltP
0
752
Member Avatar for towhoe260

Stop using the type [I]double[/I] everytime you reference a variable. Once you say[ICODE]double varname[/ICODE] you only need to use [ICODE]varname[/ICODE] from that point on.

Member Avatar for WaltP
0
202
Member Avatar for jbstin

Also: [ICODE]#include<iostream.h>[/ICODE] -- old header that shouldn't be used for the past umpteen years [ICODE]#include<conio.h>[/ICODE] -- header that should not be used as it's not portable [ICODE]void main()[/ICODE] -- [I]main()[/I] has NEVER been a [I]void[/I], always an [I]int[/I], [url=http://www.gidnetwork.com/b-66.html]see this[/url] [ICODE]clrscr();[/ICODE] -- useless function only defined in 1 old compiler, …

Member Avatar for WaltP
0
115
Member Avatar for jbstin

After you check the root, you have to check the next node. If less, move left, if greater, move right. Check that node. If less... ad nauseum... until you run into your -1. [I]That's[/I] where the new node goes.

Member Avatar for WaltP
0
121
Member Avatar for peter_budo

[QUOTE=delacruise;470219]i got an issue of creating a QUEUE of integers in a circular array using C to insert, remove, display, show CAN ANYBODY HELP ME OUT HERE[/QUOTE] In the [I]Community Feedback[/I] forum? I don't think so... Can't you find a better place to post this question?

Member Avatar for jwenting
0
167
Member Avatar for holy_boy

[QUOTE=holy_boy;471424]I may ask something else later so I m not marking it as solved as I may have further problems.[/QUOTE] When you do, please consider [url=http://www.gidnetwork.com/b-38.html]formatting your code[/url]. It will help you in the long run. It will help us in the short run. :icon_wink:

Member Avatar for WaltP
0
273
Member Avatar for k88joshi
Re: C++

Have you bothered reading [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] and [url=http://www.daniweb.com/techtalkforums/thread78223.html][b]Read Me:[/b] Read This Before Posting[/url]? This was suggested multiple times when you registered.

Member Avatar for iamthwee
0
132
Member Avatar for danbellinger1

[QUOTE=danbellinger1;471220]No dice. Is there a header I need to include?[/QUOTE] Headers don't [I]do[/I] anything. The problem is [ICODE]cin[/ICODE] [I]requires[/I] input when you specify a variable. You can't enter nothing. Using [ICODE]cin.getline()[/ICODE] will work, though.

Member Avatar for Duoas
0
267
Member Avatar for dooda

Yes, we can help, once you've read the rules as you were asked many times diring your registration process.

Member Avatar for joshua.tilson
0
105
Member Avatar for Barefootsanders

[QUOTE=Barefootsanders;470768]sorry, I should have said I changed it to this, [CODE] char *getString(char *string) { scanf("%199s",string); return string; }[/CODE] to provide for the null char. Thanks again:)[/QUOTE] We still recommend: [CODE] char *getString(char *string) { [B]fgets(string, 200,stdio);[/B] return string; }[/CODE] It's just too easy to make a mistake with [ICODE]scanf()[/ICODE]. …

Member Avatar for Salem
0
210
Member Avatar for webster22

[QUOTE=webster22;470620]Hi, i have to programm this in c++ can anyone please help me and give me the code for this... IF SOME ONE CAN HELP ME WITH THIS AND SEND ME THE CODE I WILL BE VERY GREATFULL TO THAT PERSON.[/QUOTE] So you just want to be lazy and have …

Member Avatar for ithelp
0
102
Member Avatar for sherwood12

First of all, please learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url]. Are you trying to add all the [I]i*j[/I] values together? If so, all you did is add the very last [I]i[/i] and [i]j[/I] values based on the loops. That's going to be 9+9 = 18. You need to add [I]i*j[/I] to …

Member Avatar for sherwood12
0
356
Member Avatar for sherwood12

Maybe it would help to ask the person that actually wrote the code for you than having us try to figure out what he meant when he wrote it.

Member Avatar for sherwood12
0
120
Member Avatar for brian@oit

I'm confused, too. Confusion #1: Why don't new posters ever read the post [url=http://www.daniweb.com/techtalkforums/thread78223.html][b]Read Me:[/b] Read This Before Posting[/url]? Isn't the title explicit enough? Confusion #2: No idea what your problem is. I have no idea what "[I]I donot see how to read 3 separate values, store them but not …

Member Avatar for brian@oit
0
117
Member Avatar for Trucks

Yes, [ICODE]getline [/ICODE]is correct. and use [ICODE]string[/ICODE]. It has [I]find[/I] and [I]substring[/I] functions that will help split the string into values.

Member Avatar for Lerner
0
101
Member Avatar for guitarrick

[url=http://www.gidnetwork.com/b-38.html]Format!!! Format!!! Format!!![/url] Please!!! You need [icode]srand()[/icode] to initialize the random generator (use once at the program's start) and [icode]rand()[/icode] to get a random value. And where is your [I]shuffle[/I] routine?

Member Avatar for guitarrick
0
249
Member Avatar for janxxx

First of all, [url=http://www.daniweb.com/techtalkforums/thread78223.html]read this[/url]. Then explain what your problem is, don't make us try to guess. And be patient. We all have lives and don't live here at DaniWeb -- 13 minutes is not an appropriate length of time to get demanding.

Member Avatar for Salem
-3
207
Member Avatar for privin

The same way you do it by hand. You just have to tell the computer every step you did by hand in minute detail.

Member Avatar for lineman60
0
85
Member Avatar for superrg86

[QUOTE=superrg86;470514]I need to do a stack of strings but im getting problems can anyone help ... The errors im getting: Error 1 error C2440: 'initializing' : cannot convert from 'std::string' to 'size_t' g:\pf iii\stacks\stacks\stack.cpp 23 [/quote] [ICODE]stackArray = new string[value];[/ICODE] [I]String[/I] is not an array, and [I]value[/I] is not a …

Member Avatar for vmanes
0
87
Member Avatar for balla4eva33

[QUOTE=balla4eva33;470091]Let me correct my last post. It says that the 'read' does not take [B]1[/B] parameter. I assume that means I need something like [B]infile.read(text, ios::binary);[/B][/QUOTE] This is why we ask you to paste the [I]exact error message[/I] rather than post your interpretation of the message :icon_wink: Since I just …

Member Avatar for balla4eva33
0
168
Member Avatar for swuwarrior
Member Avatar for WaltP
0
56

The End.