Type: Posts; User: 2kaud
Search took 0.08 seconds.
Yes. The processor used is determined by the scheduler when the thread is scheduled to run for its quantum. The issue of when a thread is scheduled and to which processor it is scheduled is quite a...
within the confines of any applied affinity mask. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686247%28v=vs.85%29.aspx
A processor can also be set as the preferred processor for...
When posting code, please use code tags as you did in your post #1 so that the posted code is readable.
What values can the elements of board have? Then check for these values in the loops and...
October 18th, 2014, 11:40 AM
It looks like you need a loop with a terminating condition of 4 bulls? You could use a do loop for this such as
cout << "Enter 4 digits followed by a non-digit.\n";
October 18th, 2014, 11:27 AM
Have a look at GetCurrentProcessorNumber() http://msdn.microsoft.com/en-us/library/windows/desktop/ms683181%28v=vs.85%29.aspx
It provides the processor number for the current thread.
October 18th, 2014, 04:44 AM
In this case because you are passing an invalid socket to send().
Also a better way to test would be
SOCKET Socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (Socket ==...
October 18th, 2014, 03:21 AM
You are not checking the return value of socket(), gethostbyname() and send() for errors. The return value of ALL functions should always be checked for error.
October 17th, 2014, 02:50 PM
Have you considered reversing the mapping ie
map<char, int> test;
test['d'] = 100;
test['e'] = 101;
test['f'] = 102;
test['*'] = 32;
October 17th, 2014, 01:32 PM
Have a look at http://www.cplusplus.com/reference/algorithm/find/
October 17th, 2014, 01:01 PM
// it = test.find('*'); //if I comment in just this one it won't work
// it = test.find('f'); //if I comment in just this one it will work
you are using find wrong. See...
October 17th, 2014, 10:57 AM
When you are using a fixed size array, it is good practice to define a const that contains the size of the array and then use this value in loops etc.
const int arraysize = 6;
October 16th, 2014, 03:03 PM
pArr = new Array1D*[_row];
pArr[i] = new Array1D[_col];
You haven't specified the type to use with Array1D which takes a template argument of the type to use to...
October 16th, 2014, 01:35 PM
I don't know much about regex, but I tried this code
October 16th, 2014, 03:43 AM
Yes - and then some 'bright' programmer comes along and changes the type of container from one that doesn't invalidate used iterators to one that does. Ah!!!!!!
October 15th, 2014, 11:00 AM
In c++11, erase returns an iterator to the element that follows the last element removed. This returned value is either a valid iterator or is .end() if the last element was removed.
As erase can...
October 15th, 2014, 10:18 AM
If you are using c++11, I prefer
for ( MyMapT::iterator iter=inMap.begin(); iter!=inMap.end(); /* nothing here */ )
iter = inMap.erase(iter);
October 15th, 2014, 10:06 AM
When IT equals names.end() IT is 1 beyond the end of the list and elements beyond the end of list can't be de-referenced. You need to check that IT is not equal to names.end before using IT....
October 13th, 2014, 12:07 PM
Complex1 operator + (const Complex1 & lhs , const Complex1 & rhs)
return temp += rhs;
rhs + rhs ??? :confused:
October 13th, 2014, 04:06 AM
What functions have you declared/defined for the operator >> ?
Note that there is already a STL complex class called complex. See http://www.cplusplus.com/reference/complex/
October 12th, 2014, 02:18 PM
As I mentioned in my post #2, please post your java code to the java forum. Also use code tags when posting code. Go advanced, select the code and click '#'.
October 12th, 2014, 05:08 AM
Yes, as attached. However as a simple programming exercise why not take the attached file in my post #3 and simply convert it? The processing is trivial.
October 12th, 2014, 04:50 AM
Decimal digits are based around numbers to the base 10. So if we take the number 4567 then we have
7 * 1 + 6 * 10 + 5 * 100 + 4 * 1000
If we now consider the powers of 10 we find
October 12th, 2014, 04:28 AM
You need to use two backslashes in a string when one is required. Try
October 11th, 2014, 08:56 AM
Well you should have started it earlier!
Please see http://forums.codeguru.com/showthread.php?366302-Visual-C-General-Can-you-help-me-with-my-homework-assignment
Nobody here is going to the...
October 10th, 2014, 12:08 PM
Different hashtags simultaneously updating the same data? As OReubens said in post #14, Twitter made their design in such a way to hard avoid the multiuser conflict issues entirely.
IMO of more...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.