3,183 Posted Topics

Member Avatar for Dani

> Will there be any rating score of a thread (quality of the topic in the thread) in the future? Possibly. :) Technically it's no big thing to add thread ratings, but I'm on the fence as to whether it should be calculated from thread statistics or more of a …

Member Avatar for LastMitch
5
223
Member Avatar for nmakes

Adding to what sepp2k said, when you say `Text foo`, it's as if you said `char foo[80]`. A typedef represents a type, where the name of the typedef fits in the same place that the variable name would in an actual declaration. It's simpler and more consistent to keep the …

Member Avatar for deceptikon
0
579
Member Avatar for Ancient Dragon

The problem seems to have solved itself, but the answer is largely no. There are two ways to reverse a vote/rep: 1. The voter must do it from their account by navigating to the post and clicking the vote button a second time. 2. We go into the database, delete …

Member Avatar for deceptikon
0
413
Member Avatar for geniusvishal

Note that I'm adding to happygeek's answers and directing them at geniusvishal. > No, it is not possible. Even administrators (such as myself) cannot see who is downvoting. The system is designed to be anonymous. It's possible, given that we *do* store that information in the database. But there's no …

Member Avatar for deceptikon
0
181
Member Avatar for vinnitro

Are you trying to store the music file itself as a blob, or are you storing a path for the file and relevant metadata? Because the former isn't recommended and the latter is trivial as long as you have a way of extracting the metadata.

Member Avatar for pixelsoul
0
701
Member Avatar for scotty.halupczok

> Are our speeds extremely slow? Yes. But that doesn't mean your *capacity* is low, it just means that at the time you ran the speed test, the pipe was bogged down. I'm guessing you didn't run the test when your machine was the only one active on the net. …

Member Avatar for caperjack
0
275
Member Avatar for jethro28

Your code doesn't have any continue logic. Could you post the code that "fails every time" so that we can help you fix it?

Member Avatar for jethro28
0
184
Member Avatar for nerdygirl118
Member Avatar for tensity

Rather than treat each line as separate and independent, collect them in a record where you can validate each field as it relates to the others. So for line 8 you'd be looking for a name, correct? Digits are a clear case of error when looking for a name, so …

Member Avatar for deceptikon
0
158
Member Avatar for jborden

Do you know how to find the solution in a graph manually? If not, that's where you start. Understanding both the problem and how to reach a solution to the problem is paramount. You can't write code to do something you don't know how to do.

Member Avatar for deceptikon
0
146
Member Avatar for shhhhhh14

We require proof of effort when helping with homework questions. What have you done so far? Do you know how to calculate the average of N numbers manually? Do you know how to create and populate an array?

Member Avatar for rubberman
0
103
Member Avatar for terabyte

> is it necessary to add it all the time? Yes, because that's the definition of a string. Just because something seems to work at the moment you test it doesn't mean it's correct or guaranteed to work all the time. C is one of those languages that won't help …

Member Avatar for deceptikon
0
143
Member Avatar for riahc3

I think I'll ask why anyway. Are you trying to reverse engineer an algorithm or something?

Member Avatar for JamesCherrill
0
719
Member Avatar for Kristjon

> I have to build a programme Yes, **you** have to build it. What have you tried so far? What has your research into solving the problem shown you so far? Have you done *anything*?

Member Avatar for Moschops
0
123
Member Avatar for asifalizaman

> what is the difference b/t PHP and ASP.net In what context? There's a world of difference even though they can both solve a similar problem (ie. server side scripting). Your question is like asking what the difference is between a Mac and a PC, it's a very broad topic.

Member Avatar for jkon
2
250
Member Avatar for terabyte

> I never defined str size, yet it works It crashes miserably and consistently for me. I guess "works" is a pretty loosely defined term. ;)

Member Avatar for sepp2k
0
117
Member Avatar for TonyG_cyprus

> I'm not sure exactly how that should be achieved, but I imagine at least the age of a post should grow larger and bolder as the post grows older. I like that idea. Perhaps make it stand out by using a bold font and red color after our age …

Member Avatar for TonyG_cyprus
0
360
Member Avatar for Papa_Don

> When the user bypasses entering anything within those textboxes (as they should do), what is the correct way to handle the reporting? If null values are acceptable in the database then you can write DBNull.Value when the string is empty. > Is there a way to determine if the …

Member Avatar for RvSon
0
384
Member Avatar for Papa_Don

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.validating.aspx http://msdn.microsoft.com/en-us/library/system.windows.forms.control.validated.aspx

Member Avatar for Papa_Don
0
236
Member Avatar for kony

> says that there are many errors. :( Like a lot of the PHP I've seen. That book must be really popular. :D

Member Avatar for diafol
0
150
Member Avatar for juan.sancen.7

> Thats another way to read file content. Assuming that the body of the loop properly checks for and breaks on end of file, sure. However, this loop will likely print the last line of the file twice: while (inFile.good()) { getline(inFile, line); cout << line << '\n'; } The …

Member Avatar for deceptikon
0
215
Member Avatar for murnesty

> I wonder is it safe? As written it won't compile, so if you want to get technical it's perfectly safe as it'll never run. However, I suspect that you're paraphrasing. If definitions of those arrays are provided somewhere else then the code will compile and run. Assuming a more …

Member Avatar for deceptikon
0
143
Member Avatar for alex910TN

> Look I'm not saying anything bad? You're not saying anything *bad*, you're just completely wrong. I suspect that the errors you're getting are due to how you're copying and compiling the code, not anything with the code itself, which is just a snippet and contains exactly one error on …

Member Avatar for cproger
0
253
Member Avatar for anumash

> Enter key is stored in the buffer of getchar as '\n' or '\r'?? '\n', always. Even if the underlying representation for the system is different (such as CRLF on Windows), getchar() will convert a newline to '\n' for you. That works for output too, so '\n' will become the …

Member Avatar for anumash
0
131
Member Avatar for WDrago

> row[2] and row[3] are already doubles In a DataRow, they're objects. They may *actually* be doubles, but the immediate representation is Object as stated by the documentation for the [index operator](http://msdn.microsoft.com/en-us/library/kwfe1t7z.aspx), so you must do a conversion. Your solution is funky because double.Parse() requires a string argument. You can …

Member Avatar for WDrago
0
3K
Member Avatar for dij_0983

You could certainly write a background service that ticks seconds and runs at startup, but pretty much every modern OS will provide a way to query uptime. What OS are you targeting?

Member Avatar for dij_0983
0
248
Member Avatar for deceptikon

I was going to post this in a thread, but it turned into something a bit more serious and may be useful as a code snippet. The code shows three files: * menu.h: The header file for the menu library. * menu.c: Implementation of the menu library functions. * main.c: …

Member Avatar for deceptikon
3
592
Member Avatar for ConfusedLearner

Switch cases only work for integral values. Ideally you'd somehow check the string and convert it to a number, or just compare directly. For example: #include <cctype> #include <iostream> #include <string> using namespace std; int type_index(string type) { // Normalize the string to a consistent case for (auto& ch : …

Member Avatar for deceptikon
0
163
Member Avatar for srivardhanms

> While one says "definition occures once through the program( memory is allocated once ), but the declaration can occur many times.", the other says "This means that the declaration is only one throughout the program but definitions can be many." The first one is sufficiently accurate and the second …

Member Avatar for srivardhanms
0
1K
Member Avatar for srivardhanms

[[16.21] How can I force objects of my class to always be created via new rather than as locals or global/static objects?](http://www.parashift.com/c++-faq/static-create-methods.html)

Member Avatar for srivardhanms
1
173
Member Avatar for AmrMohammed
Re: COUT

> The word 'cout'stands for console output. It stands for "character", as stated by a [somewhat authoritative souce](http://www.stroustrup.com/bs_faq2.html#cout). That's fortunate too, because if `cout` were named after and designed for consoles and screen display only, it would be vastly inferior to the general stream we enjoy today.

Member Avatar for deceptikon
0
187
Member Avatar for Potgiesh

Serializing objects like that is not safe unless you can guarantee that the class in question is a POD type. In the best case for something like std::string, you'd end up writing addresses pointing to data rather than the data itself. The actual data would be lost and the addresses …

Member Avatar for rubberman
0
204
Member Avatar for shanki himanshu

> @ tinstaafl it is also working fine on my dev-c++ but why it giving RTE on ideone? I suspect you're not giving the Ideone sufficient input to work with. Click the "upload with new input" button and add this: 5 1 2 3 4 5 There should be no …

Member Avatar for shanki himanshu
0
137
Member Avatar for tubzz

Sorry dude, but I think a good lesson for you right now would be to *fail miserably* because you relied too much on the kindness of others in doing your work for you.

Member Avatar for tubzz
0
118
Member Avatar for tubzz

Do you seriously work with your code unindented like that? So far all of your posts have zero indentation before some kind mod fixes it.

Member Avatar for tubzz
0
165
Member Avatar for ScarWars9

I plan to go to work every weekday, just like the rest of the year. Slightly improved traffic will be a nice change though.

Member Avatar for cproger
0
296
Member Avatar for joseph619

[This](http://developer.gimp.org/writing-a-plug-in/1/index.html) looks promising.

Member Avatar for joseph619
0
173
Member Avatar for anumash

> An array of pointers is possible beacuse pointers are similiar to variables. Pointers *are* variables, and the values they hold are addresses. > \*pt[3] is an array of 3 pointers i.e 3 locations are set aside for the storage of the addresses of 3 variables. In the context of …

Member Avatar for anumash
0
167
Member Avatar for saurabh.mehta.33234

> @sepp2k Then why does the code give no error if I remove static and write simply int a; a=5; Because the default linkage at file scope is `extern`. This: int a; int main(void) { a = 5; return 0; } Is functionally identical to this: extern int a; int …

Member Avatar for saurabh.mehta.33234
0
312
Member Avatar for kasi123

I prefer the iOS experience. Android has responsiveness issues whenever I use it, and that slight delay seriously affects the experience. Responsiveness issues seem few and far between on iOS.

Member Avatar for Pygame-pi
0
625
Member Avatar for <M/>

> On the endorsements, i noticed that i have several endorsements on C# and Java and i was wondering if they should show up in the "Favorite Places to Post" section? They show up on the main view of the forum or category where you've been endorsed. So at present …

Member Avatar for <M/>
0
597
Member Avatar for eogunlolu

> Need help "Help" suggests that you're doing most of the work and others are providing assistance when you get stuck. However, posting nothing but a homework assignment suggests that your definition of "help" is closer to "do it for me". So please provide evidence that you've put in some …

Member Avatar for rubberman
-1
198
Member Avatar for mical700

Line 11 of your program doesn't call the function, and as a result the compiler assumes you want that function's address. You need to include the argument list to call it: printf("%d %d\n", n, powerof2(n));

Member Avatar for mical700
0
394
Member Avatar for fedaa91

It looks like you're mixing standard C and Objective-C. Note that this is the C forum, did you mean to post in the Objective-C forum?

Member Avatar for fedaa91
0
205
Member Avatar for fedaa91

strcmp() doesn't return a boolean, it returns a relation: * <0 - The first string is lexicographically "smaller". * 0 - The two strings are equivalent. * \>0 The first string is lexicographically "larger". So when you want to test for equality, it should look like this: if (strcmp(a, b) …

Member Avatar for fedaa91
0
153
Member Avatar for cproger

That header is pretty much specific to Turbo C, and it's also ancient in terms of graphical feature support. I'd strongly recommend using something more up to date, like Qt or OpenGL. What do you want to use graphics for?

Member Avatar for cproger
0
159
Member Avatar for ScarWars9
Member Avatar for IIM

> I am receiving such annoying PM from mvmalderen. I'd suggest ignoring them if they annoy you so much. If you get PMs that are abusing or harrassing, feel free to report them. > This must be either through Post in feedback not through PM. There's no such requirement. I …

Member Avatar for deceptikon
-4
247
Member Avatar for vegaseat
Member Avatar for stultuske

If the voter were interested in explaining his or her reasoning, they would leave a comment rather than just vote, or reply to the thread in addition to voting. I'm not sure I see the benefit of showing who down votes, given the potential for revenge voting.

Member Avatar for stultuske
0
374

The End.