49,761 Topics
| |
Hey, WHen i load Dev-C++ a box comes up and says "There doesn't seem to be a GNU Make File in Path or in Dev-C++'s bin... " how do i make a GNU Make File? wilko1995 | |
Can anyone tell me how to execute a program like this, it is written, it compiles, my input and output word documents are both up and running and saved. What do I need to do to get my output document to show results from my program? Thanks. | |
Let's say there's list of numbers like this saved in a txt file: 4 6 3 4 5 How do I put it into an array? | |
I am a beginner with C++ so please excuse my ignorance. I am attempting to pass a dynamically created 2d array to a function. The array the [3]x[variable] array is created like this. [CODE] //Create array for the transformed coords double **transf; transf = new double*[3]; for (int i=0;i<atoms;i++){ cout … | |
No matter what I do, I always get the numeric value from the ASCII chart. In this case I get 104, even though I denote Name[2] as a character. [CODE] string Name= "John"; cout << tolower ( char ( Name[2]) ) << endl; [/CODE] | |
if I wanted to do for example this [CODE]class MyClass{ float x,y; void SomeFunction() }; void MyClass::SomeFunction(){ MyClass A = this;//???? } [/CODE] How would I do that? I have virtually no experience with pointers so please help me out. I basically want to make the new class I am … | |
I have been trying to make a vector class to handle particles in a particle system I am making. The problem I have is when I try to change the dir it does not do what it is supposed to. If I keep pressing up it will just bounce back … | |
Hey ! I've been using NetBeans for quite a long time, and totally addicted to it. Therefore there was no mercy when my mate wanted to join my project. - He had to get it too. He's one of those Windows guys tho x) I installed him MinGW and MSYS, … | |
Hello, I got a problem. Whenever I use rand() and I rerun the source I get the same results each time do u know whats wrong? | |
Given n points, how can I find how many different lines can be drawn through these points? Thanks | |
I have this sprite that I am printing out sf::Image aNimat; if(!aNimat.LoadFromFile("images/fish.png")) std::cout<<"File not found fish.png"<<std::endl; however I want to print it out at random places and in random numbers. Can anyone suggest how I would go about it? | |
[I]<<thread split>>[/I] Who exactly? The OP left the forum 4 YEARS ago. And there the thread lay, nice and quiet until a day ago. | |
Hi there, I'm trying to return base class pointers from the two classes 'base' and 'child', but I keep on getting a build error of "1 unresolved externals". I think it may be because I am linking all the files together incorrectly. When I comment out the problem line in … | |
[CODE] #include <limits> using namespace std; const double double_nan = numeric_limits<double>::quiet_NaN(); double x = double_nan; if (x == double_nan) cout << "OK" << endl; [/CODE] I dont get OK! Why? | |
I'm working on a bunch of stuff with arrays. At the moment I'm trying to come up with with an insert function that allows me to put as many elements as I want into an array, only keeping the five recent most elements. So I guess what I want to … | |
Here is my assignment: "Define a class for rational numbers. A rational number is a number that can be expressed as the quotient of two integers. For example, ½, ¾, 64/2, and so forth are all rational numbers. (By ½ and so on we mean the every day fraction, not … | |
How do I write a program that takes in some data files that have a bunch of numbers in them and then spits out certain numbers. Which then would be decoded using ascii values. You dont have to write the program, but it would really help full if you could … | |
Hi! My problems are more of porting a code to Windows, than the code itself. I need to download a file from a URL ( http://127.0.0.1/img.jpg ) and store it in a local file. I think I've screwed up the setting up of the libcurl libraries. I am using Visual … | |
I've followed an example from a website on how to use diff time, however its telling me that it took 0 seconds which obviously isn't right...can anyone please explain what I'm doing wrong? Thanks in advance! [code=php]int main() { time_t t1, t2; double dif; Matrix A(2); Matrix B(2); A.SetElement(1,1,1); A.SetElement(1,2,2); … | |
Im brand new to C++ & Im having trouble with this program im writing i got all the way to the end of it working im just having problems using the setw function in reading and outputting from a file. I have my code attatched for what mine looks like, … | |
My problem is how to seek or search a word from my text file. here how it done. I want to search a word "Computer" found in my text file, and will output or will be print of screen as "Computer been found!" if the keyword are found and will … | |
Hello, I know i'm suppose to ask programming questions but i'm stuck on how to do it in the first place, the question is: You are given 4 information-gross pay, number of extra hours worked, the hourly pay rate, and the income tax rate. Calculate the overtime payment: Overtime payment … | |
Hi All, What all the difference between Macros and Inline functions. Why do they prefer inline functions? When Do macros come in use? What are the disadvantages of Macros and inline functions? thanks in advance | |
I was trying out a 2-dimensional integer array on a UNIX box. I hit up a 'Segmentation Fault' on trying to run it. [CODE]#include <iostream> #include <cstdlib> using namespace std; int main() { int matrix[2000][2000]; int i, j; srand ( 1 ); for (i=0; i<2000; i++) { for (j=0; j<2000; … | |
Hi! I'm trying to build a Python extension with C/C++. I'm following the steps given in the documentation [URL="http://docs.python.org/extending/extending.html"]here[/URL]. I've followed the steps mentioned and written my first code. However, I have no clue on how to compile the project! I do not know how to create the .pyd file … | |
[url]http://en.wikipedia.org/wiki/Brainfuck[/url] Interesting. One day once I figure out c++, I might give this a whirl! | |
I NEED HELP WITH THIS ASSIGNMENT. I HAD THE WHOLE ASSIGNMENT DONE AND MY COMPUTER CRASHED AND LOST EVERYTHING. THE ASSIGNMENT IS DUE BY SUNDAY AT ANYTIME. I KNOW PEOPLE DONT LIKE IT WHEN YOU ASK FOR SOMEONE TO DO IT FOR THEM BUT IM NOT ASKING THAT I JUST … | |
I'm trying to compile the following code that I wrote out: [CODE]#include <iostream> #include <cmath> #include <iomanip> using namespace std; void gauss(double, double, double, int); int main() { const int n1 = 4; double prompt; double A1[n1][n1] = {{3,0,3,-4},{0,1,1,1},{1,1,1,2},{2,3,1,3}}; double b1[n1] ={7,0,6,6}; double x1[n1]; gauss(A1, x1, b1, n1); cout << … | |
Hi, I have been wrestling with this program all day and am looking for some help. I have never separated a program up before into separate files (main.cpp, base.h and base.cpp). What I'm trying to do is call a function from main() and have that function return a pointer to … | |
Hey guys. I hate to have to ask for help but I've run out of ideas. The program I'm trying to write is supposed to write a random list of numbers 0 - 4 and then count the occurrences of each number. The only thing I can't get to work … |
The End.