Posts
 
Reputation
Joined
Last Seen
Ranked #864
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
88% Quality Score
Upvotes Received
8
Posts with Upvotes
8
Upvoting Members
7
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
4 Commented Posts
0 Endorsements
Ranked #1K
~49.5K People Reached
Favorite Forums
Favorite Tags
c++ x 95
Member Avatar for computer engW

Or else you do a few math calculations, then set up a function to draw individual shapes.... For example, you could create a "square" function: [code=cpp] void draw_square(int sideLength); [/code] which basically loops and outputs a square (of the specified size, using a loop) to the screen... Advantage: you can …

Member Avatar for movies8time8
0
8K
Member Avatar for Mona..

Perhaps these questions will help lead you to the answer... What is obj.A? What is *(obj.A)? How is this different from (obj.A)[0]? What is **(obj.A)? How is this different from (obj.A)[0][0]?

Member Avatar for Mona..
0
182
Member Avatar for Miyamoto

Order notation is just like a simplified mathematical expression. O(n), or order-n, is like saying that the runtime is "linear", or roughly proportional to n (which could be the length of a list, the depth of a tree, the number of characters in an input, etc). We use order notation …

Member Avatar for arkoenig
0
974
Member Avatar for sexyzebra19

In general, matrices do not need to be square in order to compute their product... rather in computing A*B, the number of columns in matrix A must be equal to the number of rows in matrix B. Regardless... We can think of each matrix as being composed of row and …

Member Avatar for dusktreader
0
152
Member Avatar for rookanga
Member Avatar for wilsonz91
0
146
Member Avatar for Hawkpath

After lots of use you will tend to remember the syntax, even if when starting out you just copy and paste code. I suppose the most important thing is understanding... That is, understanding all of the components and program flow so that you can build on basic templates (provided for …

Member Avatar for Rajesh R Subram
0
157
Member Avatar for alexa868

What about a taylor series approximation... The theory is rooted in calculus, but you can probably manage by simply applying the formulae and ignoring the theory (FYI series and taylor approximations are typically covered in a Calc 2 course). Here are the approximations (scroll down to the "series definition" section): …

Member Avatar for mrnutty
0
348
Member Avatar for astala27

Let me try to understand here... The function needs to return a that represents a binary integer? Or the actual bits of the returned value need to be the correct binary representation of the decimal value?

Member Avatar for n1337
0
106
Member Avatar for vileoxidation

[QUOTE=vileoxidation;1043270]But it is not working. I get an error when I run the procedure, which says this: "string-append: expects type <string> as 2nd argument, given: #<void>; other arguments were: """ What am I doing wrong here? [/QUOTE] The issue is that your char_toupper function actually returns void... In fact, the …

Member Avatar for vileoxidation
0
204
Member Avatar for programmer01

I haven't read your code, but I would guess that you are not tokenizing properly... I would take a finite state machine (FSM) approach to solving this problem...reading in input character by character, and calling routines based on the input...(somewhat of a C influence I suppose). With that in mind, …

Member Avatar for Naira88
0
1K
Member Avatar for kudusan

There are also tons of tutorials on the subject, for both openGL and DirectX. I really suggest that you search for them on google, and if you're serious, then possibly even get a book on the subject, because some of the topics in 3D graphics and game programming are considerably …

Member Avatar for Salem
0
297
Member Avatar for sunveer

Do you mean you need to print the LU factorization of the matrix? if so, perhaps [URL="http://en.wikipedia.org/wiki/LU_decomposition"]this[/URL] page might be of some assistance...

Member Avatar for n1337
0
117
Member Avatar for Momar

Well, if you want to get technical, it has to do with how you are referencing each object at the memory level (and understanding of this depends on how much you know about memory models). Additionally, I think the pointer information is declared on the heap, vs your second declaration …

Member Avatar for CoolGamer48
0
148
Member Avatar for FTProtocol

Since Addition is a boolean value, you could also simply code: [code=cpp]if (Addition) { //do whatever }[/code] That is of course unless you are attempting to make the boolean value true...which would defeat the purpose of checking it in the conditional statement in the first place... Note: You have similar …

Member Avatar for FTProtocol
0
89
Member Avatar for William Hemsworth

[QUOTE=Shaun32887;635457]Well not ALL, just every integer up to that numbers square root. :)[/QUOTE] Yes, Shaun is correct. However there is more...A related theorem says that every number is either prime itself, or else is a product of primes. I forget who proved this (Euclid?) but here is a proof (I …

Member Avatar for Prabakar
0
156
Member Avatar for Manutebecker

yup yup of course in that case, if you ever computed a sum of 12 (two 6's), numInstances[sum] would actually be out of bounds (no error though, so be careful). So...you would have to store it in array index sum-1 in this case. Also remember that numInstances[0] would actually never …

Member Avatar for VernonDozier
0
109
Member Avatar for masterjiraya

[QUOTE]can you do something about it? [/QUOTE] Well, you could do something about it... In your for loop, do something like: [code=cpp] if (i%5000 == 0) { end = clock(); runningTime = (double) (end - start) / (double) CLOCKS_PER_SEC; cout << i << endl << "the running time is " …

Member Avatar for masterjiraya
0
108
Member Avatar for allena

Well...those links have a lot of the differences. I think basically C++ is an extension of C with added features. You can still use C code in C++, and code in a "C-Style", but C++ has features that do away with some C stuff. In terms of abstraction from the …

Member Avatar for n1337
0
487
Member Avatar for ladyscoleman

What have you tried so far? Any thoughts on the subject? Do you know how to declar a multidimensional array, or a single-dimensional array for that matter? Do you know what a conditional (if) statement is (or what a switch statement is)? Do you have any code attempts written (if …

Member Avatar for tesuji
0
121
Member Avatar for mhil_joy

OK that is a really open ended question...Before I (or anyone else) can even begin to help, we need to know a few things: 1) When you say user to user, do you mean like across a network? On the Internet? On the same computer? 2) Do you want to …

Member Avatar for Nick Evan
0
97
Member Avatar for xtr.eme

You know, it seems that introducing GUIs to the beginner programmer is a little bit like opening pandora's box. I mean, I'm not saying that in doing so we release all the evils of programming... It just seems to me that when you are new to a language or programming …

Member Avatar for Kob0724
0
82
Member Avatar for Alex Edwards

[QUOTE=Alex Edwards;630433]If anyone has a good book suggestion, or site where I can get some practice/advice on memory management I would really be grateful. I'd hate to be one of those problem-programmers that cause the dreaded memory leaks in team-projects.[/QUOTE] I literally googled "C++ memory management" and here is what …

Member Avatar for mitrmkar
0
114
Member Avatar for Sukhbir

[QUOTE=Alex Edwards;630240]You could also use a HashMap which is built for indexing, but I cannot explain that well enough to give a valid example.[/QUOTE] A Hashmap is basically a combination of an array and a list: Suppose you had a whole bunch of keys. The way a hashmap works is …

Member Avatar for Alex Edwards
0
4K
Member Avatar for niitian

The key to these and all problems is to not get overwhelmed...break it down into steps, solve first one step, then continually add more functionality.... So first we need to think about how we can keep track of the customers, both male and female, and in what queue they are …

Member Avatar for Nick Evan
0
157
Member Avatar for Jboy05
Member Avatar for faust_g

[QUOTE] vector< <vector<string> > 2dVectorOfStrings; [/QUOTE] I do believe it is just: [code=cpp]vector <vector<string>> myvec;[/code] [QUOTE]How you would size the inner vectors to 10 strings each and the vector of vectors to 10 inner vectors of 10 each would be pure conjecture[/QUOTE] You could do something like this: [code=cpp] vector …

Member Avatar for Radical Edward
0
142
Member Avatar for herms14

I think you generate 100 random numbers in the range 1 to 200, and store them in an array. Then you do 100 searches, each time generating a new random number, and using this newly generated random number to check if it is in the array (of random numbers created …

Member Avatar for n1337
0
103
Member Avatar for Gagless
Member Avatar for Jennifer84

C# and C++ have very similar syntax (C# came after, and is based on Java and by extention C++). C# was designed around the .NET framework (which I actually really like, from what I remember)... This might be helpful... [url]http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=542964&SiteID=1[/url]

Member Avatar for mitrmkar
0
292
Member Avatar for Aldayne

[QUOTE]I am having a problem because what i am doing is not related to the class.[/QUOTE] What do you mean? What specifically are you having difficulty with...Also, does your code compile? If not, where are the issues... [QUOTE]Take a look at the code below please and give me some suggestions …

Member Avatar for Aldayne
0
142