187 Posted Topics

Member Avatar for sym

No you don't. When a vector's destructor gets called, it calls the destructors of all its elements.

Member Avatar for sarehu
0
132
Member Avatar for sammyboo85
Member Avatar for sarehu
0
61
Member Avatar for acejames1

[QUOTE=John A;663631]It depends. Viruses usually don't carry weight, however, Trojans are usually a few ounces each.[/QUOTE] Be careful though: with trojans, the number depends on whether you're using standard ounces or troy ounces as your unit of measurement. The choice has never been standardized.

Member Avatar for acejames1
0
86
Member Avatar for Clockowl

[QUOTE=Duoas;668629]With just a very quick glance, that [b]notOptimized[/b]() function needs some help. A bitvector (or [inlinecode]vector<bool>[/inlinecode]) is not a good choice in such a function. Sad, but it was optimized for space, not speed.[/QUOTE] In fact, a [icode]vector<bool>[/icode] isn't even optimized for space if it's standard-compliant.

Member Avatar for Clockowl
0
209
Member Avatar for Dani
Member Avatar for William Hemsworth
0
997
Member Avatar for maddogsprofiles

The phrase "if the country is technologically advanced enough to program the script that I am asking for" is completely nonsensical. What are you even talking about.

Member Avatar for sarehu
0
120
Member Avatar for George_E

I'm unsure about the source of your confusion. What does the documentation and other information online say about these products?

Member Avatar for Ezzaral
0
100
Member Avatar for CliveClyde
Member Avatar for gregorynoob

Your problem is the same as finding the smallest contiguous subsequence sum in the sequence [n1, n1 + n2, n1 + n2 + n3, n1 + n2 + n3 + n4, ...]. Transform your sequence into this form and then solve the problem I described. Come to think of it, …

Member Avatar for RemoB
0
80
Member Avatar for BradenMurphy

Accelerated C++ is a good book. I'd recommend learning how to use a language like Scheme, and then maybe later Haskell, because that will make you better aware of the advantages and deficiencies of C++ and Java when it comes to software design. Also, maybe learn the basics of assembly, …

Member Avatar for swaira umar
0
150
Member Avatar for Priya73

[QUOTE=Priya73;657688]Can anybody suggest to me a compelling reason to use any of the programming languages [C,C++ and Java]. Under what circumstances would you use one over the other.[/QUOTE] The main benefit of Java is that it has garbage collection, and for some devices, you have to use Java because that's …

Member Avatar for swaira umar
0
160
Member Avatar for kneel

[QUOTE=kneel;661531]The purpose of debugging is to find defect. For this one needs a scientific approach to check and verify the code methodology. Discuss this scientific approach with solid comments.[/QUOTE] If you could, please define the word "code methodology."

Member Avatar for sarehu
-1
69
Member Avatar for ThinkDifferent

If you have a [i]finite[/i] alternating series, and are asked to find the sum, there's nothing you can do. Say you're given [tex]\sum_{k=0}^n C_k x^k[/tex] (I made that image with [icode][[b][/b]tex]\sum_{k=0}^n C_k x^k[[b][/b]/tex][/icode]) If you're asked to compute the sum, you compute the sum, and that's it. Besides, if all …

Member Avatar for sarehu
0
173
Member Avatar for krebstar
Member Avatar for softdev

[QUOTE=softdev;657707]is automata theory important in computer science?[/QUOTE] Yes. [QUOTE=softdev]what are example of real applications of automata and formal languages?[/QUOTE] Regexes. [QUOTE=softdev]do they have anything to do with software development and verifications?[/QUOTE] Verifications? What is "verifications"? [QUOTE=softdev]i'm jst looking forward to persuing a career in automata and formal languages so i …

Member Avatar for sarehu
0
103
Member Avatar for nikki123
Member Avatar for Salem
0
115
Member Avatar for CoolGamer48

Just say NULL, because it is the most clear. People who use anything else are idiots, trying to be clever.

Member Avatar for ArkM
0
322
Member Avatar for gray
Member Avatar for pastryman

NxPublicClass is a preprocessor macro that gets replaced with [icode]__declspec(dllexport)[/icode] on Windows and gets replaced with nothing on other platforms. That is, there is [icode]# define NxPublicClass __declspec(dllexport) [/icode] in NxOgrePlatform.h, which says that, before any code is compiled, replace that token with that replacement text. You could discover this …

Member Avatar for ArkM
0
129
Member Avatar for datta08
Member Avatar for klactose

[QUOTE=CoolGamer48;653923]To address your first issue: void pointers. Google it. It's basically a pointer that has no type bound to it. I haven't used them too much but I think they fit your needs.[/QUOTE] Dumb dumb dumb dumb dumb dumb dumb dumb what the hell are you talking about. klactose, the …

Member Avatar for klactose
0
6K
Member Avatar for moerpheus

You will not know only three languages. There is no way. You will end up accidentally having to write a few SQL queries, then some build scripts, editor customizations, web server configurations, XML transformations, ........... And before you know it, you'll have learned too many languages! Time to bang your …

Member Avatar for moerpheus
0
147
Member Avatar for iDeveloper
Member Avatar for abhi_elementx

Auxiliary memory is what's used when main memory has been damaged by an enemy attack. It frequently runs on auxiliary power.

Member Avatar for foreverlove
0
381
Member Avatar for fedderico10
Member Avatar for sftwr21

[QUOTE=Alex Edwards;650095]In my opinion, OOP is the new-school style of programming and would most likely be good practice for you. Doing everything strictly in main is really for people who are just being introduced to programming (in my opinion, once again).[/QUOTE] OOP is old-skool!! What mean you? P.S. sorry for …

Member Avatar for Alex Edwards
0
397
Member Avatar for OmniX

How large is X? What is the type of your large number? 0.00012354584 is actually quite small :D

Member Avatar for Nick Evan
0
116
Member Avatar for KenTheFurry
Member Avatar for nova2177

There is no universal definition of 'module'. Ask your professor for details.

Member Avatar for nova2177
0
146
Member Avatar for The Dude

There's nothing wrong with gambling. GrimJack said: > boundaries. What boundaries?

Member Avatar for The Dude
1
106
Member Avatar for fmwyso
Member Avatar for winterx

First, wonder what information would be helpful to people who want to help you.

Member Avatar for winterx
0
247
Member Avatar for KingsWeBe

There's no real answer to this question. If I had to restrict myself to three primary languages for the rest of time, they would be C++, Haskell, and Oz. If you're looking for current usefulness, or "applicability," I'd say C#, C++, and Java. But learning Java is trivial once you've …

Member Avatar for sarehu
0
180
Member Avatar for Alex Edwards

A big advantage of C++ that has undermentioned is that it has a much more flexible type system. Object oriented programming as seen in C++, Java, and C# is extremely restrictive in what you can do -- inheritance is fine for defining plain old polymorphic datatypes but retardedly broken for …

Member Avatar for sciwizeh
0
293
Member Avatar for zhouj
Member Avatar for vijayan121
0
171
Member Avatar for zhouj

In the first version, a value of type B is returned. And as you can see, in the second version, a value of type B& is returned.

Member Avatar for Ancient Dragon
0
173
Member Avatar for sarehu

What do you think of this? [url]http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml[/url]

Member Avatar for Nick Evan
1
147
Member Avatar for titaniumdecoy

Here's an example that does directly what you want: [code] template <typename T> int my_func(T& arg) { int count = 0; typename T::iterator end = arg.end(); for (typename T::iterator p = arg.begin(); p != end; ++p) { std::cout << "Key: " << p->first << "\n"; typename T::mapped_type::iterator value_end = p->second.end(); …

Member Avatar for vijayan121
0
115
Member Avatar for pecprasad
Member Avatar for sarehu
0
17
Member Avatar for ff4930

> Hi, I am relatively new to C#.NET and I was wondering if the garbage collection is similar to Java. Yes. > I am developing a windows form application and I am dynamically making new buttons, will they be deleted by themselves or will I manually need to delete them? …

Member Avatar for sarehu
0
134
Member Avatar for edmicman

[QUOTE=ShawnCplus;638576]Ruby on Rails isn't exactly Enterprise level, it has horrible scalability.[/QUOTE] I have seen no evidence of this.

Member Avatar for sarehu
0
219
Member Avatar for titaniumdecoy

In C99, the latest C standard, that would be legal. (Well, not the "vector.size()", but the runtime initialization of the array size.) You can use [code]scoped_array<node> nodes_array(new node[vector.size()]);[/code] instead -- if you have the boost libraries installed.

Member Avatar for sarehu
0
101
Member Avatar for ExamCompetition
Member Avatar for camthalion95
-4
324
Member Avatar for lAmoebal

About 8 years on computers, 18 years if you count recreational algorithm invention not conducted on computers.

Member Avatar for stephen84s
0
362
Member Avatar for sunshine12

[QUOTE=MidiMagic;630856]Changing the link colors usually doesn't cause trouble, but if the site has the background color set to blue, and the link color set to white, the link totally disappears on a browser with the link colors disabled. So the handicapped person using the site can't see the links.[/QUOTE] If …

Member Avatar for MidiMagic
0
130
Member Avatar for aquarian
Member Avatar for GARUD

Make a website with articles that have a creation date on them. Don't change the articles once they're posted. That's a blog.

Member Avatar for Microsys
0
198
Member Avatar for hoonv11
Member Avatar for anandi.sa

This isn't really a general computer science question, it's more of a language-specific one. The definition of 'macro' and 'constant' varies from language to language. In some, constants aren't constants, and in others, macros aren't macros. And in some, macros must "have a data type" and in some, constants don't …

Member Avatar for sarehu
0
160
Member Avatar for SACHIN4TCS

[QUOTE=niek_e;615912]So here's a program to get you started in brainfsck: [code=brainfsck] ++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++.-.---------. [/code] output: [icode]one[/icode] [/QUOTE] Oh please, that is such a lame solution :) Here's a better (partial) solution. [code] ++++[>++++[>+++++++>++++++<<-]<-]>>-.-.>+++++. [/code] And here is an attempt at a real solution. [code] ++++[>++++[>++++++>+++++++>+++<<<-]<-] >>+++++>>>,<[->-<]+> [-[-[-[-[-[-[-[-[-[<->[-]] <[<--.<++++.>.<----.>>-]>] <[<<.++++.--.+.>++++.>-]>] …

Member Avatar for sarehu
-1
260

The End.