const char *p;
int index;
if ((p = strchr(x, 'e')) != NULL)
index = p - x;
Type: Posts; User: spoon!
const char *p;
int index;
if ((p = strchr(x, 'e')) != NULL)
index = p - x;
scanf("%s",&filename1);
scanf("%s",&filename2);
filename1, filename2 are single characters; a string can't fit in a character. you need a character array that has at least (length of input)+1...
according to http://www.boost.org/libs/smart_ptr/shared_ptr.htm
testp.get()
int sumrow[5] = {0}, sumcol[5] = {0};
for (x=0; x<ROWS; x++)
for (y=0; y<COLS; y++) {
sumrow[x] += val[x][y];
sumcol[y] += val[x][y];
}
element is a local variable of retrieveSub. modifying it is useless, it won't affect anything else
maybe you wanted to modify what it pointed to? or something?
google for SSH with keys
from wikipedia:
"Includes the IIS web server, fax support, Rights Management Services (RMS) Client, file system encryption, dual processor (two sockets) support, system image backup and recovery,...
no, they mean using malloc() to allocate memory on the heap (which is larger and it tells you if the memory allocation fails)
each process has a task_struct; which processes do you want to access information for? I think usually only the kernel has access to this
process information is also available in the /proc...
both should be okay
the first time you pressed return after the number, the "cin>>numGroups" only retrieves the number, and the newline stays in there
so the next time you call cin.getline(groupname,30), it retrieves...
by default, members of structs have public accessibility and public inheritance, and members of classes have private accessibility and private inheritance
a while loop is probably better, so that it works for a = 1
also, inside the loop, you probably want to assign the things back to "a", like "a = a/2" and "a = a * 3 + 1"
int steps(int a)
{
...
This is extremely inefficient though.
insert 1000 values into a max-heap, and then extract the maximal element 10 times
you put a function call in the initializer list? that doesn't make any sense; did you mean this? the answer is generally yes (there are some obscure exceptions).
class someclass {
public:...
i dunno, it appears to work
does it tell you what the problem is? compile error? wrong output?
in case they were picky for some reason, here are some things you might try:
* change "long long"...
You want a "set", which is an associative container. there are two implementations for associative containers.
One is the self-balancing binary search tree, which is sorted and gives a O(log n) to...
http://en.wikipedia.org/wiki/XOR_linked_list
The first one has some issues though. b is first constructed using the default constructor, which might have undesirable side-effects. Also won't work if you only have non-default constructors, and...
if you don't include anything, it will give an error; to show that it indeed does complain
int main() {
return INT_MAX;
}
some of your other headers included it
can you explain what all this is supposed to do? and why you think it accomplishes the task?
try putting the operator functions outside of the class declaration, since they are not part of the class
edit: there are two ways of doing operator overloads. The first is as an instance method...
there's a system() function in stdlib.h