5,676 Posted Topics

Member Avatar for klactose

[QUOTE=klactose;1131105]Thanks for the reply Salem. Unfortunately I get the exact same error message when I make the declaration "int i;" at the top of the function. So something else afoot. Any more ideas?[/QUOTE] Maybe you need to point out the exact line. Your compiler may not match the numbering on …

Member Avatar for klactose
0
99
Member Avatar for pamelaanne05

You need to output the teens OR the ones value -- not both. If output 00,20-90, output 0-9 but if output 10-19 don't output 0-9

Member Avatar for EngSara
0
141
Member Avatar for ccie007

[QUOTE=ccie007;1130253]Hi frens, I couldn't compile this solution code given by my university on visual studio.Visual studio works fine with other C++ files.[/QUOTE] Why not? Does your machine crash? When asking for help [I]always[/I] give enough information so someone that is not in your class or can't see your screen can …

Member Avatar for ccie007
0
167
Member Avatar for PDB1982

Yet another way to keep the count: Have an array of 366, maybe call it [ICODE]bdays[366][/ICODE] (one extra to skip day 0) In your code, [ICODE]array[][/ICODE] keeps track of which b'day each person has... So, if [ICODE]array[0][/ICODE] has a b'day on 122, increment it: [ICODE]bdays[array[0]]++;[/ICODE] You've just counted that b'day. …

Member Avatar for jonsca
0
198
Member Avatar for WaltP

Last night in FireFox 3.5.3 I lost the formatting in all of Software Development. The other communities seem fine. I checked Opera and another computer, all is fine. Other websites seem to be unaffected. I deleted all Daniweb cookies to no avail. I also have no 'attach files' option for …

Member Avatar for jbennet
0
201
Member Avatar for Mushy-pea

All I know is if governments were people, every one of them would be committed to asylums. And not one seems to have any fiscal sense, nor responsibility. With a "[I]government of the people, by the people, for the people[/I]", how is it [I]the people[/I] keep getting screwed?

Member Avatar for jbennet
0
288
Member Avatar for Jiwe

[QUOTE=Jiwe;1130656]error LNK2028: unresolved token (0A00000F) "extern "C" int __stdcall [B]GetUserNameA[/B](char *,unsigned long *)" [/QUOTE] Where is GetUserName[B]A[/B]() defined?

Member Avatar for Jiwe
0
3K
Member Avatar for piocasino

Repost your code. It got lost when correcting the post -- it's not a Code Snippet. What was the value of y[0] before? What does it change to?

Member Avatar for WaltP
-1
167
Member Avatar for Kevin_160
Member Avatar for invisi

[QUOTE=NathanOliver;1130537]you are using [icode] cin >> val; [/icode] which will cause an infinite loop to occur if if something other than a char is entered. [/QUOTE] Other than a [ICODE]char[/ICODE]? Like what? If the input requires a [ICODE]char[/ICODE], what can you input that isn't a [ICODE]char[/ICODE]?

Member Avatar for WaltP
0
126
Member Avatar for Narue

[QUOTE=vegaseat;1127046]I let you in on a secret, don't tell anybody else, I love to eat out in relatively close by Las Vegas.[/QUOTE] Oh, I thought you were a [url=http://en.wikipedia.org/wiki/Chevrolet_Vega]car lover[/url] :icon_razz:

Member Avatar for jonsca
2
514
Member Avatar for burkeyb

[QUOTE=obih08;1127507]padalhan u naman poh aq ng database program s turbo c sa email q ***[/QUOTE] 1) Put your hands on the proper keys when you start typing. 2) Type full English words, not Gobbledygook 3) If you have nothing to add to [I]this[/I] thread, start your own.

Member Avatar for jonsca
0
314
Member Avatar for johndoe444

If [iCODE]fgets()[/iCODE] doesn't work, I can only think of reading a character at a time.. But, you should [url=http://www.gidnetwork.com/b-62.html]see this[/url] about [iCODE]scanf()[/iCODE] and strings.

Member Avatar for Salem
0
255
Member Avatar for Masterace
Member Avatar for horseygal

[QUOTE=KSS;1129564]Also your if clause should be like this: [CODE]If dbltotalaverage >= 90 Then txtgrade.Text = "A" ElseIf dbltotalaverage >= 80 And dbltotalaverage <90 Then txtgrade.Text = "B" ElseIf dbltotalaverage >= 70 And dbltotalaverage <80 Then txtgrade.Text = "C" ElseIf dbltotalaverage >= 60 And dbltotalaverage <70 Then txtgrade.Text = "D" Else …

Member Avatar for SCBWV
0
110
Member Avatar for Dewey1040

[B]Nathan[/B] is right. Change the [ICODE]for[/ICODE] statement. You can better write the for as [ICODE]for (;!ifs2.eof();)[/ICODE] which is really a [ICODE]while()[/ICODE] Also, as he says, you read off the first line of file 2. Then [code=c++] for( int i = 0; !ifs2.eof(); i++ ){ getline( ifs2, s2 ); // Read …

Member Avatar for WaltP
0
178
Member Avatar for binay2
Member Avatar for latszer

To expand on the cryptic "[I]Dont use gets[/I]" statement, [url=http://www.gidnetwork.com/b-56.html]see this[/url]. Caveat: Though I agree wholeheartedly about not using [ICODE]gets()[/ICODE], I would let it go in this and only this program 1) because you declared the arrays as 256 2) this is simply to test the concept of comparing strings …

Member Avatar for Narue
1
221
Member Avatar for Stefano Mtangoo

[QUOTE=evstevemd;1129497]Yes Jonsca, I have already read that and I was wondering if there is one single function within standard library. [/QUOTE] No. [QUOTE=evstevemd;1129497]I saw somewhere string::Substr() and I'm trying to check if that is what I want. [/QUOTE] That is one way to do it. [QUOTE=evstevemd;1129497]Anyway the bad of C++ …

Member Avatar for jBat
0
96
Member Avatar for hsp700

So? You leave the \n in the buffer and exit? What does [I]that[/I] prove? Try typing "abcdefgh". What happens?

Member Avatar for hsp700
0
132
Member Avatar for DJPlayer

I don't see anything glaringly wrong, but since you didn't bother to show us what you are reading, what should have happened, and what did happen, that's as far as I'm going to go with it. Remember, the more details you give, the less we have to guess -- and …

Member Avatar for WaltP
0
243
Member Avatar for abhimanipal

You are dealing with floating point numbers. .99 probably is stored as a close approximation of .99, very close. But not close enough. Same with all the other values. Therefore, you have a little wiggle in the values and probably end up with something similar to -0.000000001 as an answer.

Member Avatar for abhimanipal
0
99
Member Avatar for Slacked

Buffered output is probably the problem. End the [ICODE]cout[/ICODE] line with [ICODE]flush[/ICODE] to empty the buffer immediately.

Member Avatar for Slacked
0
158
Member Avatar for ELBUF

Yes, except for using [ICODE].eof()[/ICODE] See [url=http://www.gidnetwork.com/b-38.html]this[/url]. [ICODE]feof()[/ICODE] is the same.

Member Avatar for vmanes
0
137
Member Avatar for Orusaka

What's in the file -- a text '0' or a binary 0? [iCODE].get()[/iCODE] only reads exactly what's in the file. It doesn't translate an ascii digit into its binary equivalent. You need to do the conversion.

Member Avatar for WaltP
0
95
Member Avatar for Fbody

[QUOTE=Fbody;1128937][code] /*part of solution by WaltP */ #define UINT_BITS ( CHAR_BIT * sizeof(unsigned int) ) #define rotateleft(x,n) ((x<<n) | (x>>(UINT_BITS-n))) #define rotateright(x,n) ((x>>n) | (x<<(UINT_BITS-n))) [/code][/QUOTE] Be more careful quoting. I never posted in that thread nor did I write that code.

Member Avatar for Fbody
0
164
Member Avatar for alcay

By reading a tutorial. Did you bother to look at the posts at the top of the forum as suggested? Or are you expecting us to teach you post by post?

Member Avatar for TheGhost
-2
279
Member Avatar for Stefano Mtangoo

[url=http://lmgtfy.com/?q=TCHAR]TCHAR[/url] As for the [I]other[/I] things, my psychic powers are limited today. Must be sunspots.

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for datk0m
Member Avatar for whgeiger
0
1K
Member Avatar for traced

Read [B]Narue[/B]'s first post (her second was for us, not you) and attempt to understand what she said. [QUOTE=dibbieshir;1127626] This is my code and after it i don't know further after strtok..... I use strtok because some says it is useful to it..... [/QUOTE] If someone said you should use …

Member Avatar for WaltP
0
106
Member Avatar for akshay91
Member Avatar for lllllIllIlllI

Head up to Washington an check out Bill Gate's house, Microsoft, Real Player, Google... Wait a minute. This is a vacation... Universal Studios, Disneyland. That's more like it...

Member Avatar for vmanes
0
154
Member Avatar for neosonic

Don't you have to resize the picture control? Try changing picture1.width and picture1.height instead.

Member Avatar for neosonic
0
102
Member Avatar for suzi_ausi
Member Avatar for DJPlayer

[QUOTE=DJPlayer;1128280]this is for a C program.. not C++. I posted in here because I was gonna build in C then transform.. so I doubt I can use stringstream.. =/ ugh[/QUOTE] If it's a C program, you need to post it in the C Forum. It doesn't matter what you want …

Member Avatar for Dave Sinkula
0
226
Member Avatar for Niiagbah

Enter text in the textboxes Select the records from the database and look for a match. If found, open the new form.

Member Avatar for WaltP
0
37
Member Avatar for MatthewSedam
Member Avatar for tejubjp

[QUOTE=vb5prgrmr;1127847]To begin with, this is not a code snippet! It is a question! [code] snipped [/code] [/QUOTE] Did you just hand the answer to them? After over 1000 posts you should know better than that. We [I]help[/I] here. We are not a coding service.

Member Avatar for vb5prgrmr
0
184
Member Avatar for zangetsuu

First of all, in English there are things called sentences. They use periods at the end and the next sentence starts with an upper case letter. It helps us understand your question. Second, if you'd [url=http://www.gidnetwork.com/b-38.html]format your code[/url], some of your problem would be immediately apparent, and again, [b]we[/b] could …

Member Avatar for zangetsuu
0
127
Member Avatar for nats01282

[QUOTE=VilePlecenta;1128359]why not give studying a try [/QUOTE] [url=http://www.gidnetwork.com/b-38.html]Formatting the code[/url] would help, too.

Member Avatar for VilePlecenta
0
1K
Member Avatar for Masterace
Member Avatar for mrnutty
Member Avatar for eternaloptimist

[QUOTE=eternaloptimist;1128137]i have a few questions.: 1)if i wanted to write a line of code needed to declare a 1-dimensional array named names that can hold 8 string values would this be correct?: char names[8];[/quote] No. You have defined a single character array that hold 8 characters only. You need to …

Member Avatar for eternaloptimist
0
107
Member Avatar for rEhSi_123

[url=http://www.gidnetwork.com/b-38.html]Format FORMAT [B]FORMAT[/B]!!![/url]

Member Avatar for WaltP
0
2K
Member Avatar for holocron

You don't really need to use ungetc() for either program. For the reverse a sentence, use the recursive call to simply skip to the next character. Then when you get to the \n, start the return cycle outputting each character. A similar technique can be used for the word.

Member Avatar for WaltP
1
693
Member Avatar for soapyillusion

And what's with the mega-indenting? What are you going to do when you have 4 nested loops with IF statements? 4 characters is enough, not 4 tabs: [code=cpp] void countVowels(string a,int& aCont, ,int& eCont,int& iCont, int& oCont, int& uCont) { int nonVowl=0; string.str(a) for(i=0;i<=string.length();i++) { switch(string.at(i)) case 'a': aCont++; break; …

Member Avatar for soapyillusion
0
255
Member Avatar for furqankhyraj

Posting bad code badly with no comments is not helpful. Please refrain and stick to asking for help. Or actually, [I]start[/I] asking. You need to learn before you can help.

Member Avatar for WaltP
0
150
Member Avatar for ghalibsultan

[QUOTE=Fbody;1128051]Grrr.....You're lucky I goofed on the rep button...[/QUOTE] That's OK. I got your back. With teeth!

Member Avatar for WaltP
-1
82
Member Avatar for wolfhunter777

A double post is when the same message gets posted twice. What you did is post more information -- perfectly acceptable. There is no problem making 2 or more posts in a row as long as there is a reason for it.

Member Avatar for WaltP
1
107
Member Avatar for lawal2000

As long as it's a Public Function, which you have, just add the form name: [ICODE]Call Form1.RemoteCalled()[/ICODE]

Member Avatar for abu taher
0
110

The End.