2,384 Posted Topics

Member Avatar for rock_rocks

Is anyone here else going to recreate all the code you've written as an initial attempt? *<stunned> silence* C'mon. That's not a question, that's asking someone to do 99% of thee work for you.

Member Avatar for jephthah
0
118
Member Avatar for Dani
Member Avatar for dark7angelx07
Member Avatar for DavidB
0
1K
Member Avatar for EnderX

I enjoyed [URL="http://www.intellectualconservative.com/2008/01/31/another-loony-theory-from-the-wonderland-of-evolution/"]this article[/URL] recently.

Member Avatar for Ravenous Wolf
1
374
Member Avatar for linux

[QUOTE=thunderstorm98;539210]I had Experience with Firefox 2, It uses lot of bandwidth in background until when no site is opened...Switch to version 3 (Beta 1) and choose yourself what to load or what not to under Options.[/QUOTE][memory jog]I was recently fixin' up some memory issues with one of my FF installs …

Member Avatar for MidiMagic
0
404
Member Avatar for kartouss

Various subtleties, but 'EOF character' is not a good idiom to maintain. [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1048865140&id=1043284351[/url]

Member Avatar for kartouss
0
549
Member Avatar for zandiago

I was wishing I'd gotten Gen 5 Archos. [url]http://www.daniweb.com/blogs/entry1726.html[/url]

Member Avatar for jwenting
0
178
Member Avatar for technogeek_42

"Explanation" in the comments: [code=C++]#include <iostream> #include <ctime> int main() { /** * Fill a struct tm. */ struct tm date = {0}; date.tm_year = 108; // 2008 date.tm_mon = 1; // February date.tm_mday = 19; // 19 /** * Normalize it. */ time_t normal = std::mktime(&date); /** * Create …

Member Avatar for technogeek_42
0
442
Member Avatar for sneekula

[QUOTE=sk8ndestroy14;508798](annoyance: people that correct others on every little thing).[/QUOTE]Shouldn't 'annoyance' be capitalized? And shouldn't the period be in the parentheses? :D

Member Avatar for reddawg
0
1K
Member Avatar for Rashakil Fol

You _ss! What happens in IRC stays in IRC! But those kicks/bans are silly. The one(s) it's designed to catch work around them in seconds anyway.

Member Avatar for MidiMagic
1
235
Member Avatar for sneekula

[QUOTE=sneekula;507983]What forms of transportation would you consider in your situation to minimize energy consumption?[/QUOTE]Back local politicians who would propose extra lanes on the major throughways on which I drive my Chevy Silverado.

Member Avatar for GrimJack
0
676
Member Avatar for bharaniabhishek

Sounds like your install may be hosed or you have not yet set the include directories.

Member Avatar for abhikkumarbasu
0
241
Member Avatar for Ancient Dragon

I had it from the quick reply several times yesterday and again just now -- hadn't cleared temp files. But same behavior on 2 boxes.

Member Avatar for MidiMagic
0
217
Member Avatar for Dave Sinkula
Member Avatar for atish00

[QUOTE=atish00;547913]nad what is ^Z thanx for the help so far.[/QUOTE][url]http://en.wikipedia.org/wiki/End-of-file[/url] [url]http://en.wikipedia.org/wiki/Control-Z[/url]

Member Avatar for atish00
0
112
Member Avatar for curt1203

If your current behavior is like a previous attempt, maybe it's because this latest code you posted doesn't compile. [code] int max = temp[0][COLOR="Red"],[/COLOR] int maxtempnum = 0; int min = temp[0][COLOR="Red"],[/COLOR] int mintempnum = 0; [/code]

Member Avatar for curt1203
0
490
Member Avatar for nelledawg

[QUOTE=mitrmkar;549982]Here is the version I used (and please go through the %d's and change to %lf where-ever you output a double using printf())[/QUOTE]Trivia: using [icode]%lf[/icode] with [icode]printf[/icode] is undefined behavior in C90, a common nonstandard extension, and standardized in the uncommonly-implemented C99 as ignoring the [icode]l[/icode].

Member Avatar for mitrmkar
0
161
Member Avatar for jer_stud56

[icode]'[COLOR="Red"]\[/COLOR]n'[/icode][code] if(code=='G')[COLOR="Red"]//;[/COLOR] ifs >> gas; // ???[/code][code] if ( gas_charge < gas_minimum )[COLOR="Red"]//;[/COLOR][/code]

Member Avatar for mitrmkar
0
602
Member Avatar for flash121
Member Avatar for atish00

[QUOTE=Ancient Dragon;548949]**p can be either 1) a pointer to a pointer, or [COLOR="Red"]2) a two dimensional array[/COLOR].[/QUOTE]I'm generally a bit leary about (2). I understand the implication that the meaning of [I]a two dimensional array[/I] here is perhaps [I]a simulated two dimensional array that has been dynamically allocated[/I] rather than …

Member Avatar for Dave Sinkula
0
139
Member Avatar for Jennifer84

The issue with this sort of thing is that the problem is often not where it is detected. So looking at the place that it was detected my prove fruitless. There are some utilities that help detect memory abuses, but I cannot recommend any. What I have done instead is …

Member Avatar for Jennifer84
0
178
Member Avatar for nelledawg

The same newline issue is left after the input of the double. It then immediately satisfies the subsequent call to [icode]scanf[/icode] in which you type [icode]y[/icode].

Member Avatar for nelledawg
0
178
Member Avatar for suresh1010

[QUOTE=Ancient Dragon;547774]If that's the case, there are a couple ways to do it. One way is to use strcpy() function [code] char str[] = "SACRED"; strcpy( &str[2], &str[3]); [/code] I didn't compile or test that, but I think it will work.[/QUOTE]Undefined behavior.

Member Avatar for Ancient Dragon
0
179
Member Avatar for RexxX
Member Avatar for sukhmal.sena
0
96
Member Avatar for jimps

It almost sounds like you are trying to calculate the length of a string like [icode]strlen[/icode] does.

Member Avatar for atish00
0
85
Member Avatar for Run.[it]

You're lucky it doesn't compile so that you don't have an unconditional loop continually writing unknown garbage to a file. I'd say your first step here might be to have some text to write to the file. And given your loop, I'd say skip the looping for the moment too. …

Member Avatar for Run.[it]
0
207
Member Avatar for Jennifer84
Member Avatar for sohguanh
0
151
Member Avatar for majestic0110

Hmm. Probably the audio streaming transmitter interfaced to a PC with a custom USB interface. I got to bring in my old stereo and speakers for device testing! But the 8051-cored USB micro and the DSPs were way fun (after the learning curve) and really cool 'exotics' to mess with.

Member Avatar for Lardmeister
0
154
Member Avatar for ithelp
Member Avatar for MattEvans

Missouri must just bide its time waiting for [URL="http://en.wikipedia.org/wiki/New_Madrid_Earthquake"]big ones[/URL].

Member Avatar for sneekula
0
228
Member Avatar for sfurlow2

A for loop typically has 3 clauses, you've got 2. You're not going to execute code inside a loop if that particular hunk of code is itself outside the loop.

Member Avatar for pmvignesh
0
168
Member Avatar for rezax123

[url]http://en.wikipedia.org/wiki/COM_file[/url] Hm. I wonder how much of their resurging popularity these days it the "[t]aking advantage of this default behaviour, virus writers and other malicious programmers sometimes use names like notepad.com for their creations."

Member Avatar for rezax123
0
133
Member Avatar for msaenz
Member Avatar for Dave Sinkula
0
189
Member Avatar for Metahuman

[URL="http://c-faq.com/expr/seqpoints.html"]Sequence points[/URL]. [edit][URL="http://c-faq.com/expr/precvsooe.html"]More on sequence points[/URL].

Member Avatar for Aia
0
107
Member Avatar for virtual008

[code]void Rot13(std::string &buffer) { int inc; for(inc = 0;buffer[inc] != '\0';inc++) { if(buffer[inc] >= 'a' && buffer[inc] <= 'z') { if(buffer[inc] < 'n') { buffer[inc] += 13; } [COLOR="Red"]else[/COLOR] { buffer[inc] -= 13; } } [COLOR="Red"]else [/COLOR]if(buffer[inc] >= 'A' && buffer[inc] <= 'Z') { if(buffer[inc] < 'N') { buffer[inc] += …

Member Avatar for virtual008
0
214
Member Avatar for bwjones

Pay close attention to the names of the functions that you (a) declare, (b) call, and (c) define. Short of this trifecta, you're asking for linker errors.

Member Avatar for bwjones
0
187
Member Avatar for flash121

In [icode]stocen[/icode], initialize the array elements of [icode]stevec[/icode] after [icode]new[/icode]ing it.

Member Avatar for flash121
0
61
Member Avatar for debuggit

Minor nit.[QUOTE=Ancient Dragon;546354][code] line( int num1, int num2, int num3 ) { n1 = num1; n2 = num2; n3 = num3; }[/code][/QUOTE][URL="http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.6"][10.6] Should my constructors use "initialization lists" or "assignment"?[/URL]

Member Avatar for debuggit
-1
101
Member Avatar for wonder_laptop

[icode]*str[/icode] is the character pointed to by [icode]str[/icode], which has type [icode]const char[/icode]. The [icode](unsigned char *)[/icode] cast tells the compiler to convert [icode]str[/icode] from a pointer to a [icode]const[/icode] plain [icode]char[/icode] to a pointer to an [icode]unsigned char[/icode] (the "conversion" itself is likely trivial, though I won't say "it …

Member Avatar for wonder_laptop
0
108
Member Avatar for Jboy05
Member Avatar for cbattagler

A random [URL="http://groups.google.com/group/comp.lang.c++/browse_thread/thread/f46c3d9fd0e297f9/206e75a1130506fa?lnk=st&q=overload+member+comparison+function+sort+group%3Acomp.lang.c%2B%2B#206e75a1130506fa"]grab[/URL] or [URL="http://groups.google.com/group/comp.lang.c++/browse_thread/thread/58dcc5d34ebddb9a/f1a268be3405321f?lnk=st&q=overload+member+comparison+function+sort+group%3Acomp.lang.c%2B%2B#f1a268be3405321f"]two[/URL] to start with.

Member Avatar for cbattagler
0
110
Member Avatar for Matt You
Member Avatar for Matt You
0
121
Member Avatar for namanithi

Get rid of these... [code]#include <fstream.h> #include <conio.h> #include <dos.h>[/code]...and discard all the functions you are using from them, such as [icode]gotoxy[/icode] and [icode]cputs[/icode], et al. And if you still want the character-mode stuff, look into [URL="http://msdn2.microsoft.com/en-us/library/ms682010.aspx"]this[/URL]. And, frankly, discard most of what you've learned in "C++" I/O so far …

Member Avatar for Dave Sinkula
0
71
Member Avatar for ! !

[QUOTE=Ancient Dragon;540079]That wasn't possible when smoking.[/QUOTE]It is quite possible, it depends on the person. Years ago after finishing a couple mile jog the first thing I did was light up. I get more winded these days because I don't exercise much.

Member Avatar for jbennet
0
438
Member Avatar for jesseb07

[QUOTE=jesseb07;543846]hi, this should be a fairly simple question to answer. I have a function in my program that takes the content of a text file and populates an array with all the information. First it has to see how many lines the file has (as it can change) so it …

Member Avatar for jesseb07
0
6K
Member Avatar for kylcrow

Ought you be passing by reference? Here for example: [code] CartFramePtr head; cart.setHead(head);[/code]

Member Avatar for Ancient Dragon
0
317
Member Avatar for Nemoticchigga

If you have to ask about casting, there's a 99% chance that it's the wrong thing to do.

Member Avatar for Nemoticchigga
0
121
Member Avatar for cosmos22

cosmos22 -- you're not expecting it to display the image or open a text editor, are you?

Member Avatar for Ancient Dragon
0
213
Member Avatar for plgriffith

Consider this: scanf("%s", &tempString); temp->artist = tempString; The second argument to `scanf` is of the wrong type. `temp->artist` is a dangling pointer -- you need to allocate memory for it. You don't copy the string with assignment, look into `strcpy`.

Member Avatar for plgriffith
0
2K
Member Avatar for prushik

Even if I use the correct specifier for a short in sscanf, I see expected results. [code=c]#include <stdio.h> int main(void) { char buffer[100]; struct { float x,y; short dir; float xspeed, yspeed; } user = {123.45,6.789,100,43.21,98.76}, remote; sprintf(buffer, "%f,%f,%i,%f,%f", user.x, user.y, user.dir, user.xspeed, user.yspeed); puts(buffer); sscanf(buffer, "%f,%f,%hi,%f,%f", &remote.x, &remote.y, &remote.dir, …

Member Avatar for mitrmkar
0
157

The End.