Don't try to hijack threads, don't break forum rules.
http://cboard.cprogramming.com/c-programming/announcement-forum-guidelines-read-before-posting.html...
Type: Posts; User: Doodle77
Don't try to hijack threads, don't break forum rules.
http://cboard.cprogramming.com/c-programming/announcement-forum-guidelines-read-before-posting.html...
You could run Turbo C in DOSBox
SciTE + gcc/friends on both Windows and Linux.
answer = playAgain(2); //LINE 195
while (turnAgain == 'y'); //LINE 196
{
// roll again
makePlay();
printf("Die 1 is a %d.\n", die1);
printf("Die 2 is a...
A local copy of ptr is passed to sayHi, if you want to modify the value of ptr in main, you need to pass a pointer to ptr, so you would have void sayHi(char **str).
jason_m: you're thinking of the...
The C implementation and C++ implementation of those tests are different code, they work differently. If you compiled the C example with g++ instead of gcc it would come out exactly the same.
IActiveDesktop::ApplyChanges, if you can use it from C#
Logfile now says: Called function: 00000065 (that's what it claims, but the call works fine, and calls a function somewhere near 0x7000000 i think)
The library with the function is based somewhere...
I really need to print what the address of a certain member function is, but the compiler is complaining, saying
"error: ISO C++ forbids taking the address of a bound member function to form a...
You're completely out of memory. Assuming your struct is 8 bytes long, you will need 488281.25 megabytes of memory for the whole linked list. That is probably even larger than your hard drive.
Perhaps the main thread's stack is 1MB?
On linux you can call x-www-browser which is generally a symlink to an available browser, so that you're not reliant on the user having Firefox. There is no cross-platform way to do without using...
The operating system would most likely buffer the file for you.
If you're afraid one of the "words" will be huge, you can have the program move forward until it finds the newline to get the length of the line, then malloc()s that much memory, and then goes back...
Use fgets()
Compile the C code as C++, and you get exactly the same result.
I'm not trying to say that I could magically implement everything in STL in less space, I'm just saying that the mere use a string or vector in your c++ program adds 52kb of STL code.
#include <vector>
#include <string>
int main() {
std::vector<int> v(10);
for (int i=0;i<10;i++) {
v[i] = i*(i+i^3);
}
reverse(v.begin(), v.end());
std::string q = "omgomgom";
He means this:
#include <iostream>
int main() {
std::cout << "STL adds bloat. Lots of it.";
return 0;
}
8109
gcc version 3.4.2 (mingw-special)
You could also do
typedef struct element element;
struct element {
int value;
element* next;
};
sscanf. Use the %f type specifer. Be sure to look at the example.
I think you can also do it with a stringstream or something but I'm not sure how.
http://msdn2.microsoft.com/en-us/library/ms648042(VS.85).aspx
http://msdn2.microsoft.com/en-us/library/ms648046(VS.85).aspx
the resource type you want is RT_RCDATA (application-defined resource)....
uh >_> can't find it right now
On windows, you can use resources. Really the best idea is to just put it in a separate file though.
esbo, any particular reason you use the old (i.e. pre-C89) function declaration syntax? TurboC?