It's meant to make making Windows for the API quiker and easier, but one of the problems is that in order to properly create a window with a create window function, needs to know about the Windows Procedure, but I don't know if you can properly pass a windows procedure wihtout parameters to a function in an include file. Lets say I create a Windows Procedure with typical parameters like this:
LRESULT CALLBACK(HWND, UINT, WPARAM, LPARAM);...
User Profile
Collapse
Profile Sidebar
Collapse
massdeletion101
Last Activity: Aug 11 '07, 01:34 PM
Joined: Mar 2 '07
Location: I live in muggy Greenwood Indiana
-
Working on a header file for OpenGL
-
Help with 64 bit intagers
I'm using Bloodshed Dev-Cpp version 4.9.9.2 (version five beta) as my compiler and IDE, and I am trying to compute pi truncated to the first 15 decimal places, only there is a problem. I am using a while loop for my computation, and I've figured out that in order to get all decimal places right I need a loop that repeates over 1 billion times to recieve one hundred percent accuracy. However, it will not compile for some reason. The message the compiler... -
That's okay. Trying is enough. I might contact someone else about the problem.... -
Actually, I'm adding two variables of the same type. Looking at the code, both values are of type long double. I tried what you said though, despite thinking you were wrong. It still doesn't work right sadly.:( However, there is a different outcome, it just displays nothing. (but that's because I put two numbers with deimal values in them instead of just one with a whole number, I typed 1.5+1.5 and I got nothing)...Leave a comment:
-
Help with input to floating point values
I'm making a calculator that is Supposed to calculate floating point values, but somethign goes wrong along the way (can't be sure what). It calculates intagers just fine, but when I add a decimal with an extra intager on, something funky happens. It infinitly displays a rounded number. For instance, if I type in "3+1.3", instead of displaying "4.3" once like it should, it will just display "4" line by line infinatly... -
-
Having trouble with streams and strings
I'm trying to write a string I entered into the program to a file. I won't explain it though, it's probably easier if I just post the code:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
string input;
cin >> input;
fstream myupdate ("G:\\Documents \\C++\\myfile.t xt", ios:: out | ios::app);
... -
Well that kinda stinks. Oh well, no biggy since I already have a good history of assembly under my belt. I also kind of suspected this because C++ has more diverse versions and libraries and as such, converting native back to C++ would be no easy task unless there was a standard library that could not be altered/added to or created in any way much in the way Assembly works (or at least I think it does)....Leave a comment:
-
Seems to me that if loops aren't a good way to go. You should use a case or switch statement for this kind of work, because loops are better for repition on a current condition....Leave a comment:
-
Good native machine code to C/C++ interpreter?
I tried google and Ask, but java to C++ or native code to byte code etc etc interpretors always flood the screen. Here is the thing though, I basically need a way to "decompile" an executable back into C/C++ source and thought that this apparently fictional interpretor was the way to go. Can someone give me some links to a couple good ones? I'm having a lot of trouble finding them. -
Help with fstream.open();
I'm a newbie at manipulating external files. Is there any way to specify a path to the file with C++? It thinks that the path in the file name string is filled with unrecognisable escape sequences. Here is the code for what I have so far:
...Code:#include <iostream> #include <fstream> #include <string> using namespace std; int main() { fstream filestream("test.txt"); -
Algorithm help.
Is there an algorithm that allows me to manipulate a variable by a range of falues in the standard STL with standard arithmatic? Something like this:
vector.push_bac k(2);
vector.push_bac k(3);
5 / algorithm(vecto r.begin(), vector.end()); /* returns the resulting qoutent of the numbers in the vector.*/
Anyone know anything like this? It would be a whole lot easier than writing my own code to divide it one at a ... -
Okay, I've got the updated code. For some reason, it won't iterate to the second number though, only the first on. As a result, it will display numbers that arn't prime like 9 and 21. Can anyone tell me what's keeping it from iterating through the numbers? Here is the code:
...Code:#include <iostream> #include <limits> #include <list> #include <algorithm> using namespace std; int main()
Leave a comment:
-
This is the code for my program, designed to find every prime number up to the maximum intager limit predefined by C++. If you see anything wrong with it, please let me know:
...Code:#include <iostream> #include <limits> #include <vector> #include <algorithm> using namespace std; int main() { vector<unsigned long long int> prime_nums; unsigned longLeave a comment:
-
I thought a vector was an STL container. What if I just calculated the amount my computer can hold and just limit it to a few megs under that? Would that work?...Leave a comment:
-
One more thing, I'm not trying to name every element. I'm trying to make a program that finds every prime number until my comps RAM can't handle it anymore. To do such a thing, I need to add the numbers I find to an STL container of some kind, then iterate through it with each one in an attempt to factor each number I come across to check if it's prime by dividing it with previously found numbers. Problem is, I can't do this without a segmentation...Leave a comment:
-
Never heard of it. Could you give me an example of the syntax? I'm pretty new to this....Leave a comment:
-
Problem with string to variable name conversions
Is there anyway to assign a value of type string to be the name of an integer, or convert the value or vise versa?
Example:
int Q = 1;
string member = "member" + Q;
//some kind of type name or conversion takes place?
int member1 = Q;
Anybody have some ideas on how to do this? I tried the streamstring technique that I got off of another thread, but that does not work with changing values,... -
Please please PLEASE anybody who sees this help...
I need help, and when I ask for it around here, it usually goes with little or no replies and help watsoever. It seems the only way to get the message across is to make the title desperate sounding. And really, I am desperate.
Here's the thing, I've created a program that finds every prime number. It then allocates that prime number to a vector in the function I defined for future use with bigger numbers. That way, I can keep up with... -
No activity results to display
Show More
Leave a comment: