1,684 Posted Topics

Member Avatar for sgriffiths
Member Avatar for Cyrus_DB

What do you mean by 'algorithms'? Do you just want to memorize a bunch of algorithms? (Pretty useless; you can just look them up in a book.) Or do you want to be good at picking the right algorithm for your task? (Pretty useful.) Or do you want to be …

Member Avatar for DavidB
0
141
Member Avatar for GriffIT34
Member Avatar for Duki
0
225
Member Avatar for Lun
Member Avatar for MIGSoft
Member Avatar for hadi_82

1. It is a way of thinking, especially organizationally. Different tasks are the responsibilities of different objects. For example, in C++, it's the responsibility of the vector to reallocate its own memory as needed, not some that of some procedure that uses the vector. 2. It's a way to create …

Member Avatar for hollystyles
0
249
Member Avatar for enampwd
Member Avatar for enampwd
0
78
Member Avatar for dev.cplusplus

I'd guess a good starting place is [url]http://en.wikipedia.org/wiki/IDNA[/url]

Member Avatar for dev.cplusplus
0
307
Member Avatar for troupm

Here is the solution to the GIF posted before. 4 8 1 5 6 7 3 9 2 1 6 3 2 7 8 4 5 9 8 5 6 1 2 9 7 4 3 9 4 5 8 1 3 2 7 6 3 7 4 9 8 …

Member Avatar for Scottg1989
0
384
Member Avatar for jacksoncapper

[QUOTE=iamthwee] A 3D line can be represented by:- [CODE]x + y + z = <number>[/CODE] [/QUOTE] No, that's a plane. A 3D line can be represented with two points on the line. For example, (0,3,4) and (3,2,1). Alternately, you can represent a 3D line with a point on the line …

Member Avatar for Rashakil Fol
0
88
Member Avatar for Mechoopda
Member Avatar for Nisha R

There is pretty much no reason to use shell scripting if you're guaranteed that your environment will have perl, unless that's what you happen to prefer. Except for maybe some really small stuff.

Member Avatar for chrisranjana
0
250
Member Avatar for The Dude

a) Who are you to tell people what to do on the Internet? b) You think he wouldn't be out to 'solicit sex' from children if MySpace didn't exist? Should they also ban Yahoo! from having user accounts? I got a 'sexual solicitation' from somebody in my area, reading my …

Member Avatar for goldeagle2005
0
240
Member Avatar for jbuzz120
Member Avatar for Rashakil Fol
0
518
Member Avatar for nanodano

[QUOTE=iamthwee]Hmm, but what separates perl from c++? The fact that the regex utilities are built in as opposed to the boost libraries in c++ that are not?[/QUOTE] It's quite simple. You can get a lot more done in Perl in a given amount of time than you can with C++. …

Member Avatar for Rashakil Fol
0
494
Member Avatar for cocojim

[QUOTE=cocojim]Rookie Disclaimer. I am confused about what is the difference between: A: char *p="string"; [/QUOTE] "string" in this case is an array stored in some global location, and only seven bytes have been allocated for that string. (One is for the character with integer value zero that marks the end …

Member Avatar for WolfPack
0
231
Member Avatar for Woobag

He did use srand actually... The problem, Woobag, is that you're only supposed to seed the random number generator once. If you seed it every time you run rand, then you're resetting the random number generator back to its original state each time! So use srand once - as Ancient …

Member Avatar for Rashakil Fol
0
190
Member Avatar for sofia_nkl
Member Avatar for Rashakil Fol
0
143
Member Avatar for Nedals
Member Avatar for nsan

If you want to write CGI programs in C or C++, and want to know how it works, read this tutorial: [url]http://www.cs.tut.fi/~jkorpela/forms/cgic.html[/url] This is not how Google does things, though. What do you think web servers like Apache are written in? C and C++. Google has its own software that …

Member Avatar for iamthwee
0
221
Member Avatar for freemind

[QUOTE=freemind]As for delete[] - this belongs to the last actions I have to do. My primary concern at the moment is that the code starts running as it is supposed to do :-) Optimization belongs to the last stage before giving up the ready code and will be done, I …

Member Avatar for Rashakil Fol
0
273
Member Avatar for ds_matrix

[QUOTE=duckmurder]Attempt to run the program after restarting your computer, if that does not work then make sure that your opperating system supports the program that you're attempting to run[/QUOTE] Could you, um, please explain your reasoning?

Member Avatar for Rashakil Fol
0
121
Member Avatar for ShawnCplus

What separates students in college is not their preexisting knowledge of a particular language, it's their problem solving ability (which is called creativity). Therefore, I recommend solving some problems with a language that doesn't have as much to come out and bite you. This will give you more experience trying …

Member Avatar for Rashakil Fol
0
272
Member Avatar for BeastOverlordH6

[quote]You could insult someone. And we don't want that, do we?[/quote] Insulting people is a good thing. People feel insulted when you tell them things that they know are true, but are denying to themselves or are afraid of being true. Many insults are used to deflate others' sense of …

Member Avatar for BeastOverlordH6
0
210
Member Avatar for aarya

[QUOTE=aarya]i have gon through w3school about xml. i know what it is ext.but still not able to get idea how it is useful and anybody show the website example to show how xml is useful.thanks[/QUOTE] It's useful if you want to store data with ten times the space and three …

Member Avatar for inkrajesh
0
97
Member Avatar for kris.c

What do you mean by 'random'? What is the range of these numbers? If they're numbers from 0 to 99, then you can prefill the array, do a random_shuffle on them, and then go through the array looking for numbers at their own indices. Whenever you get them, swap them …

Member Avatar for Narue
0
284
Member Avatar for maleblon

Could you be more specific? How do you want it translated? Your post is vague and makes no sense.

Member Avatar for maleblon
0
129
Member Avatar for kris.c

Yes. Want to know how? It's operating system specific, but one general option is to use the 'system' procedure. Or, if you're using a Unixy operating system and want more control over how things are done, look at execve and its friends ('fork' followed by 'execv' will start a new …

Member Avatar for kris.c
0
189
Member Avatar for jubleebow

So, in this problem, are your distances large enough for the sphericity of the Earth to make a difference?

Member Avatar for iamthwee
0
152
Member Avatar for codergem

There are many ways. You could do how you do it on paper. You could use the property x + y = (x-1)+(y+1).

Member Avatar for iamthwee
0
287
Member Avatar for jaden403

Your syntax for initializers is incorrect. Use only one colon, then separate with commas. [code] class Point { friend void setX( Point &, int ); friend void setY( Point &, int ); public: Point() : xCoordinate( 0 ), yCoordinate( 0 ) { }[/code]

Member Avatar for Rashakil Fol
0
178
Member Avatar for >shadow<
Member Avatar for anupam_smart
0
243
Member Avatar for lunatic11

if they're evenly distributed random numbers, n1 = n2 = n / 2, and 3 * S1 = S2 = 3*S/4, approximately. I do not feel like calculating the actual probability distributions of these values, though...

Member Avatar for Rashakil Fol
0
86
Member Avatar for Rashakil Fol

Create a posting games forum. And don't let that forum's posts contribute to the post count.

0
327
Member Avatar for dude543

I think a good solution is to check if you've reached a node the second time only on nodes whose distance from the beginning is a power of two. This lets you find a loop in linear time. From this you can also use divide and conquer to find the …

Member Avatar for dude543
0
143
Member Avatar for newgurl

[QUOTE=Lerner]Second, the following doesn't follow a basic tenet that I follow when writing code for myself. That tenet is to write no more than a single function before I compile looking for errors.[/QUOTE] That's not so horrible. On one homework assignment, a sparse matrix implementation, I handed in code with …

Member Avatar for Rashakil Fol
0
206
Member Avatar for compeat

loller, are you 16 years old? I make an exercise out of guessing people's ages based on their writing style and would like to see how accurate I am.

Member Avatar for DMR
-1
2K
Member Avatar for bobradi

x * y = x + x + ... + x (y times). Just put a zero somewhere and use a loop that runs y times adding x each time. Or in your case, replace x with a, y with b - c.

Member Avatar for andor
0
184
Member Avatar for warpeace2006

Iraq doesn't cost many American lives, only several thousand. We should stay in there, then invade Iran, followed by Pakistan, India, Sri Lanka, Bangladesh, Burma, Thailand, and so on. After we conquer Australia we'll get two extra soldiers every turn, and that should make rolling through Asia like a walk …

Member Avatar for server_crash
0
633
Member Avatar for demonhunter777
Member Avatar for yuzhang

Is this in C or C++? What is your definition of 'string'? If you're using an array of characters with a zero at the end, then you can use the procedure [inlinecode]strcmp(x, y)[/inlinecode] to compare the contents of two arrays of characters, whose memory addresses are x and y. For …

Member Avatar for SpS
0
258
Member Avatar for achala

Beware of the performance costs, though. If you just pass a vector, as in the code below, you'll end up copying the entire vector, which takes an amount of time proportional to the length of the vector. Unless the compiler is unreasonably intelligent, which is never the case. [code]int foo(vector<int> …

Member Avatar for Lerner
0
149
Member Avatar for Ross Giffard

[QUOTE=Ross Giffard]I'm having trouble getting an overview of data structures. I've read about the different file types and the different ways of indexing but I can't see the whole thing as an overview. I know theres some logic somewhere! for instance, how do I find out the information about all …

Member Avatar for Ross Giffard
0
73
Member Avatar for Dani

[tex]Oh this is awesome! Testing...[/tex] Okay, I guess it's stuck in math mode. [tex]Testing...$ testing testing $testing....[/tex] maybe? [tex]Testing...\text{\huge{a text portion}}...testing...[/tex] Some more testing... [tex]\int_1^n \frac1x dx[/tex] And some more... [tex]\frac{\left(\frac{1 + \sqrt 5}{2}\right)^n - \left(\frac{1 - \sqrt 5}{2}\right)^n}{\sqrt 5}[/tex] [tex]\text{\huge{\(\frac{\left(\frac{1 + \sqrt 5}{2}\right)^n - \left(\frac{1 - \sqrt 5}{2}\right)^n}{\sqrt 5}\)}}[/tex]

Member Avatar for provenshop
0
175
Member Avatar for honeybleak

No, that's not what's being asked for. honeybleak, do you know how to do the calculation on paper?

Member Avatar for soxers12
0
471
Member Avatar for tydruk

If you understand the language you're using, then you should have no problem running through the code by hand or in your head to see what happens, given some particular program. So do that.

Member Avatar for tydruk
0
204
Member Avatar for Sonic_2006

I'd say the applied math program is as 'good' as the CS program, since it mixes good math classes with what I consider the good CS classes. This is coming from somebody majoring in math or applied math who sneaks around CS classes. If I were in your position I'd …

Member Avatar for Sonic_2006
0
200
Member Avatar for Kiba Ookami

Learn Scheme and Haskell. I don't know what Scheme's best applied to (probably teaching Scheme, really), but I think learning it will make you a better programmer if you let yourself go from any ways of thinking you've acquired with C++ or Java. C++ and Java basically form a subset …

Member Avatar for Rashakil Fol
0
108
Member Avatar for CaliVagabond

'In'? You're probably thinking the wrong way. Each array element contains the address of a bunch of characters. So strings[3][0] == strings[4][0] compares two characters: the character located at the memory address computed by the expression, 'strings[3]', and the character located at the memory address computed by 'strings[4]'.

Member Avatar for CaliVagabond
0
126
Member Avatar for Forsal

> Can you please explain me the weakpoints of c++ language? No call-with-current-continuation. No closures. I.e. C++ lacks fundamental features that other programming languages have (but most lack). It takes time and typing to do things that could be completed much more quickly and easily in other languages. No good …

Member Avatar for Ancient Dragon
0
236

The End.