Posts
 
Reputation
Joined
Last Seen
Ranked #209
Strength to Increase Rep
+9
Strength to Decrease Rep
-2
89% Quality Score
Upvotes Received
73
Posts with Upvotes
62
Upvoting Members
38
Downvotes Received
12
Posts with Downvotes
12
Downvoting Members
3
22 Commented Posts
1 Endorsement
Ranked #858
Ranked #254
~113.69K People Reached
Favorite Forums
Favorite Tags

278 Posted Topics

Member Avatar for cbreeze

I'm not really sure if I understand your problem, because as far as I can see you are already have all of the knowledge to solve it. Your question is how to pass the two matrices to the thread that is going to multiply them. And you say that you …

Member Avatar for Tedi_1
0
3K
Member Avatar for ankit,joy

Takes about a 2 second Google search... probably less: [url]http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html[/url] [url]http://www.boost.org/doc/libs/1_45_0/doc/html/thread.html[/url]

Member Avatar for sumitlubal_1
0
234
Member Avatar for Kesarion

webhost.com won't allow you to connect to the MYSQL database remotely. Try to ping the domain: C:\Users\thelamb>ping mysql9.000webhost.com Pinging mysql9.000webhost.com [10.0.0.23] with 32 bytes of data: 10.0.0.23 is the local ip on 000webhost.com where they run the mysql server.

Member Avatar for Ancient Dragon
0
1K
Member Avatar for ekin5683

[code]if(data[j] == ayat)[/code] This comparison will only work if the user enters the exact string that is in the data array. This is not what the question asks, you need to come up with a way to compare parts of(the entire student ID, or part of the student name) the …

Member Avatar for ekin5683
0
2K
Member Avatar for pato wlmc

i is generally used for loop counters.. but no one is forcing you. Specially if the body (the part between { and }) of the for loop is big, you might consider using a more meaningful name for the loop counter. There are a lot of 'naming conventions'.. each with …

Member Avatar for Tumlee
0
5K
Member Avatar for tomtetlaw

There is nothing wrong with this snippet (but yes, use dynamic_cast). Maybe you set the breakpoint wrong, You're saying something with a DLL and an EXE, so if the code of Main() is in the DLL, how did you set the breakpoint? You can try instead to show a MessageBox.

Member Avatar for tomtetlaw
0
2K
Member Avatar for shadowscape

How about instead we help you solve what is wrong with this code. Now, to do that.. we need to know what you mean with 'doesn't work when called'. This sentence alone is not very helpful: Does it crash? Does it just it give output, but not what you expect? …

Member Avatar for JasonHippy
0
160
Member Avatar for littleleaf

Naturally, you can have multiple connections to one port. Just think of an HTTP web server serving web pages to thousands of users connected on port 80. The way you distinguish between clients is by socket number. Now, you falsely assume that every time accept (or any WinSock functions) returns …

Member Avatar for littleleaf
0
439
Member Avatar for sinatra87

When you return from main, your program is terminated, this also means that the console window will close. In Visual studio, if you execute your program by pressing 'Ctrl + F5' it will not immediately close, instead it will wait for you to press a key. In other situations, you …

Member Avatar for sinatra87
0
2K
Member Avatar for peq

And now we have to guess what the problem is, right? Why don't you help us out and tell us what you're having problems with, ok? Makes things a lot easier for the people willing to spend time trying to help you.

Member Avatar for peq
0
206
Member Avatar for ragnarok511

Your question is impossible to answer. How am I suppose to give a value to how difficult it will be for you? All I know, from my own experience, is that for me it is easiest to learn a language by just starting to write a project in it. This …

Member Avatar for thelamb
0
242
Member Avatar for IndianaRonaldo

[code=cpp] char* a[10]={"asd","QWE","ghj"} [/code] On this line, you are assigning const char* (everything between "'s) to a char* (elements of a). So when you try to modify something at a[1][1] you are trying to modify a const char* indirectly. Because this constant data ("asd", "QWE", etc.) is stored in a …

Member Avatar for IndianaRonaldo
0
348
Member Avatar for sergent
Re: OS

There is a big OS development community here: [url]http://forum.osdev.org/index.php[/url] with a wiki: [url]http://wiki.osdev.org/Main_Page[/url] Usually, hobby-OS projects are compiled with a GCC cross compiler. There is a document on the OSDev WIKI about how to set this up. In early stages, the kernel can not depend on anything from from libc …

Member Avatar for sergent
0
175
Member Avatar for cableguy31

You can use (win)pcap to gather network data... it's probably a bit over-kill for your solution though. If you're doing this on Linux, why not make use of /dev/random? On Windows, why not use 'CryptGenRandom()'? If you somehow don't want this, I think easier randomness can be obtained from mouse …

Member Avatar for cableguy31
0
324
Member Avatar for rannamaa

When you pass an array to a function, information about its size is lost (unless the function only takes arrays of a certain size, e.g. void foo( string arr[100] ); instead of void foo( string* arr ) or void foo string[] arr) ). Since this is a C++ forum, you're …

Member Avatar for rannamaa
0
118
Member Avatar for apanimesh061

_TCHAR is typedef'd as 'char' when your project uses 'ANSI' settings, it is typedef'd as 'WCHAR' when your project is unicode. wprintf is just like printf, but instead it takes a const WCHAR* as input, not a const char*. L before a string literal ("string") tells the compiler that this …

Member Avatar for Narue
0
193
Member Avatar for maybnxtseasn

Yes there is, e.g. in the 'singleton' pattern. Or when you have a global static class that holds objects that should be modifiable. Usually though, you are right that you don't want to do this. But returning a const& is very common, for example in getter functions.

Member Avatar for Narue
0
160
Member Avatar for oliviars22
Member Avatar for thelamb
0
259
Member Avatar for programing

I'm not going to read your code, it is messy. In general, say you have two singly linked lists p and q. To link them together, you can simply make the last element in p point to the first element of q. In pseudocode: [code=cpp] LinkedList p,q; // traverse to …

Member Avatar for arjunpk
0
244
Member Avatar for mattloto

The problem is in these lines: [code=cpp] Point start, end; Point(double x, double y) { this->x = x; this->y = y; } [/code] Your Point class has one constructor, that takes two arguments. However, no where in the Ray class you tell it what the arguments should be. So the …

Member Avatar for mrnutty
0
147
Member Avatar for Agni

I'm not sure if this is what you mean, if not, can you give an example what you're confused about? [code=cpp] struct base { virtual void test() {} }; struct derived : public base { void test() { } virtual void test2() { } }; int main() { derived* d …

Member Avatar for Agni
0
327
Member Avatar for 02marks

I suppose that is a debug assertion you're getting? You should also mention on which line (and don't put spaces in the code tag). Usually it means that you're accessing some_vector[size], but since the vector is indexed from [0...size-1] this is out of range. Without proper code tags your code …

Member Avatar for thelamb
0
203
Member Avatar for jnewing
Member Avatar for tdba.316

Your comments are a bit excessive, I know this is something very personal but generally you'll want to have few comments that help understand the code, not comments that repeat what the code says. Don't take this too harshly though, I am really a comment-minimalist. E.g. [code] #include <iostream> // …

Member Avatar for tdba.316
0
578
Member Avatar for lalala423

Run the code under a debugger, then tell us on which line it segfault. If you run windows, you can use Visual Studio or whichever IDE you use. You can't really expect people to invest time into reading your code (or copy/pasting + compiling themselves), when you can easily pinpoint …

Member Avatar for lalala423
0
163
Member Avatar for stemiros

You can add some 'type' variable to the base class, that you set through its constructor. [code=cpp] class base { enType type_; public: base( enType type ) : type_( type ) {} enType getType() const { return type_; } }; struct derive : public base derive() : base( TYPE_DERIVE_1 ) …

Member Avatar for mrinal.s2008
0
2K
Member Avatar for daviddoria

If I remember right, partial template specialization is in the C++0x standard. I don't know if you can do it on one member function like you want though. Haven't looked into it yet as afaik it's not implemented yet in VS. Also, the enable_if stuff Mike mentioned is in C++0x, …

Member Avatar for mike_2000_17
0
588
Member Avatar for fadi_1234

Because 0+2+4+6+8+10+12+14+16+18+20 = 110? What do you think the output should be.

Member Avatar for veda&&
0
92
Member Avatar for pdwivedi

Because what you're passing on line A is not a pointer to nVal, it is a pointer with value 65, and you are printing the value of the pointer. On line B you pass the address of nVal, so a pointer with value 2359119. So in the first case you …

Member Avatar for mike_2000_17
0
604
Member Avatar for margeaux54

C++ programming language is more a reference book (at least that is how I use it). I don't know the first two books you read, but if they gave you a good basic understanding of C++ then I would try to start a project. This is the best way of …

Member Avatar for rubberman
0
140
Member Avatar for arun srinivaas

It is compiler dependent, and you should not need to worry about it. In fact, my output is : [code] 3740816 3740872 3740928 3740984 3741040 3741096 3741152 3741208 3741264 3741320 [/code] new can allocate memory anywhere on the heap, there is nothing that says that two consecutive calls to new …

Member Avatar for rubberman
0
140
Member Avatar for stylemonger

Some comments... Do you understand now why you need the extern keyword? Your use of include guards is a little over-the-top. Placing the #ifndef ... around #include statements normally results in faster compilation, but in my opinion it is way too messy if projects get bigger. Generally, if you use …

Member Avatar for stylemonger
0
674
Member Avatar for lelejau

You're compiling the code with unicode support. If you look at how szExeFile is declared, you'll see: [code]TCHAR szExeFile[MAX_PATH];[/code] Because you compile with unicode support, the compiler expands 'TCHAR' to 'WCHAR', which is a wide character. So in your project settings, you should compile with 'multi-byte support', or change procname …

Member Avatar for thelamb
0
495
Member Avatar for highflyer8

[code] if (determinant = 'E') [/code] This will _always_ be true, note that in C/C++ if you want to compare two values you should use '==', not '='. I'd suggest to write the if statements like this: [code] if( 'E' == determinant ) [/code] That way, if you accidentally write …

Member Avatar for thelamb
0
151
Member Avatar for Brie Guy

Your StateList is defined as vector<int>::iterator. StatesPicked is vector<std::string>. So StatesPicked.begin() will return a vector<std::string>::iterator, not vector<int>::iterator. Also, why do you do StatesPicked.begin() + N ? N is 0 so what would be the effect? If you're able to use C++0x features, you can write the code like this: [code] …

Member Avatar for thelamb
0
76
Member Avatar for finston

Is it a pile of .c, .cpp and .h files? If so, try to add those to a C::B project and set the additional include paths to the same folder. Then try to compile and see how many errors it spits at you. You can mess around with the object …

Member Avatar for finston
0
568
Member Avatar for SourabhT

You can just give 2 (or more) template 'variables': [code] template< typename A, typename B > class TwoTypes { A a_; B b_; }; And use it like: TwoTypes<int, char> [/code]

Member Avatar for mike_2000_17
0
164
Member Avatar for stereomatching
Member Avatar for stereomatching
0
227
Member Avatar for bkoper16

I've only glanced over your code, this caught my eye: [code] case 1: Fmonth = 'January'; [/code] What compiler are you using? This line should generate an error among the lines of "too many characters in constant". I don't know if this is the cause of your problem, as it …

Member Avatar for thelamb
0
176
Member Avatar for w1mark

You can create an std::map, that maps the strings to integral values. Then call map::find and use the returned iterator to retrieve the key and use that in the switch switch statement.

Member Avatar for Agni
0
238
Member Avatar for beejay321
Member Avatar for spoonlicker

[QUOTE]Dude, you're a hoot. I officially invite you to Daniweb's IRC channel so that you can entertain us in realtime chat.[/QUOTE] Well, this thread has had one use... I didn't know there was a DaniWeb IRC!

Member Avatar for katokato
-1
695
Member Avatar for Ricky65

"locks up a lot when downloading certain pages" That's not a very good description of your problem... can you be more specific? Does it freeze completely? If so, does it every time if you try page X? Did you run under a debugger to see where it is freezing? etc.

Member Avatar for Ricky65
0
1K
Member Avatar for pato wlmc

To your first question: cin by default 'splits' on the space character. So say: [code] string test; cin >> test; [/code] If the user enters "one two", test will be equal to "one". [EDIT] My original 'easy' way was plain dirty as thankfully pointed out by mike_2000_17, use his solution …

Member Avatar for WaltP
0
3K
Member Avatar for azencot

1.3 times as long doesn't seem very significant, how long does the 'fastest' algorithm take? How many times did you run both algorithms. Can you show us the exact difference in code between both approaches, your explanation is a little unclear to me.

Member Avatar for azencot
0
181
Member Avatar for rickster11

How will treating the / as whitespace help you? I assume that you want to convert the user's input (e.g. 3/4) to a float (0.75) in your code? So you'll have to split the input string on the '/' character (and do something sensible if the '/' is not found), …

Member Avatar for vijayan121
0
121
Member Avatar for LevyDee

Easy to test? Create two threads that run a function with a static variable, print the value of the variable and then increment it. Make sure the first thread is finished before starting the second.

Member Avatar for LevyDee
0
79
Member Avatar for gregarion
Member Avatar for djarn
0
146
Member Avatar for pseudorandom21

I don't think it's possible to give a good answer to that question. It will depend on the person reading your resume whether it's good or bad. In my eyes, it shows initiative and the ability to set something up from nothing. Also, if there are more people working on …

Member Avatar for mike_2000_17
0
106
Member Avatar for airerdem

break is the right way.. but keep in mind that you can only break from 1 loop. [code=cpp] for( int i = 0; ...; ...) { for( int j = 0; ...; ... ) { if( something ) break; // You don't need to explicitly continue here, since it is …

Member Avatar for airerdem
0
108

The End.