49,761 Topics

Member Avatar for
Member Avatar for valleymorning

Hello all, I have a trouble finding Magic Numbers. I'd greatly appreciate any help in writing a function in C/C++ that will find all magic numbers (with 1000 iterations or less). "Magic numbers" are 6 digit numbers that have the property that they are equal to the square of the …

Member Avatar for John A
0
151
Member Avatar for ankit894u

For a given integer n>1, the smallest integer d>1 that divides n is a prime factor. We can find the prime factorization of n if we find d and then replace n by the quotient of n divided by d, repeating this until n becomes 1. Write a program that …

Member Avatar for ankit894u
0
194
Member Avatar for azjherben

In C++ code, how would I customize an extension. I'm using C++ and my program outputs files, if/when I make an installer for it, I'd like to know how to make a program that can assoicate a file extension ex. ".iazj" with a name, icon, and program to open.

Member Avatar for Nathan Campos
0
110
Member Avatar for Clarkie

Hi there, I have been working for the past 3 months at Moxconsole.net and Clarkie's-Cave forums creating/editing save game files for people using a program called CWCheats for the PSP. I have edited just over 100 files each taking a min of 5 minutes. Thats around 20 hours min of …

Member Avatar for Clarkie
0
359
Member Avatar for serdengil

I am a new C++ user with emacs. Our Prof. wanted us to create a prog. which basically write the positive which is entering ascending order. I can do the ascending order program but he wanted us to make user prompt to enter the number in ascending order. The user …

Member Avatar for mrnutty
0
161
Member Avatar for ElieM

I use the visual Borland Turbo C++ 2006. if the project is a CPP package this is the error --->[url]http://i156.photobucket.com/albums/t18/Mankind-195/NewNewBitmapFile.jpg[/url] if the project is a unit.cpp this is what I see. --->[url]http://i156.photobucket.com/albums/t18/Mankind-195/2.jpg[/url] I can compile for errors and warnings. But when I get 0 errors 0 warnings, I can't run …

Member Avatar for ElieM
0
84
Member Avatar for rhesus303

This is a noobie question due to my lack of windows programming so pls excuse me in advance if this question doesn't make sense at first. I'm working on a visual c++ project and I would like to use some routines that I have in some c files. Although the …

Member Avatar for Tom Gunn
0
296
Member Avatar for pymatio

Attached is the start of my Breakout clone, at the moment the ball should just bounce around a couple of times (smoothly) & then quit. But the ball bounces around with varying speeds and with jerky movements, why?

Member Avatar for pymatio
0
125
Member Avatar for seakayaker

I am new to OOP. Before I did my best never to use global variables and it worked fine. But with OOP I find that I am starting to use global variables... very frustrating indeed. How do you prevent it? Let me give you an example. Assume you have a …

Member Avatar for seakayaker
0
161
Member Avatar for Acute

Hi, guys! I'm new in OOP, so i have some problems here... I'm doing a model of an elevator. There are three classes: building, elevator(which is located in a building), passenger. I have a class "building" which contains as a composition another class -"elevator". Class "elevator" has buttons(function-elements) inside, such …

Member Avatar for Acute
-2
123
Member Avatar for grihalo

I've just finished my homework program and I'm looking for any critiques. Whether they be about my methods, format of how the code is spaced and such, or anything of the sort. Also some ideas on decent commenting would be helpful. In summary I'm trying to learn some good programming …

Member Avatar for VernonDozier
1
164
Member Avatar for daviddoria

This may be a gdb problem or a KDevelop problem, but I'm hoping it's a c++ problem so it's more easily fixed! If I "execute" my application either in KDevelop or from a terminal, it finishes and terminates without any problems. However, if I step through the code, when it …

Member Avatar for mrnutty
0
148
Member Avatar for daviddoria

I have written a small program (it depends on big libraries, so I will not post the actual code) that performs correctly, but segfaults at the very end (main return). [code] int main() { ..... my code here... std::cout << "Finished." << std::endl; return 0; } [/code] I see "Finished." …

Member Avatar for NicAx64
0
2K
Member Avatar for ellimist14

Ok guys I know I should know this but I didn't do any programming all summer so I'm rusty. Basically I have to read a file into an array of structs and allow the user to print a specific employees info, print the struct, etc. That part is easy. The …

Member Avatar for vmanes
0
75
Member Avatar for NinjaLink
Member Avatar for iammfa

hi, i'm beginner in c++ and i'm using SDL with it, i started with beginner SDL tutorial, the 1st lesson learning me how setup SDL, i don't understand some steps from step 11 to 13, i hope some guides this a link: [url]http://lazyfoo.net/SDL_tutorials/lesson01/windows/msvsnet0508e/index.php[/url] regards iammfa

Member Avatar for GDICommander
0
141
Member Avatar for akhilesh890

How does the following recursive call work ? max ( fn(x,y),fn(x,y+1)); please give me a clear explanation .

Member Avatar for VernonDozier
-3
42
Member Avatar for invisi

[CODE]#include <iostream> #include <cstdlib> #include <ctime> #include <string> using namespace std; void RandomArrayFill(int* array, int size) { //int* array = new int[size]; cout << "Creating and filling the array with integers..." << endl; for(int i = 0; i< size; ++i) { array[i] = rand() % 101; } cout << "Array …

Member Avatar for invisi
0
139
Member Avatar for cmel89

[code]/** Computes the number of different groups of integers summing to value n * @pre n is a non negative number. * @post None. * @param n The number specified by the user to calculate. * @return The number of different groups of integers for the specified number. */ #include<iostream> …

Member Avatar for Sky Diploma
0
100
Member Avatar for gcardonav

Hello everyone: As I stated previously I am learning my C++ on the run because is required for one of my classes and well any help I can get is appreciated. I created a code to read a .txt file containing a list of numbers. My problem is that the …

Member Avatar for gcardonav
0
131
Member Avatar for joisan

This is my problem: getCurves (a); vector<int> RA(a), SA(a); I need to determine the size of vector for "RA" and "SA" by using "a" which is a reference parameter that obtained from "getCurves" function. I will get this error message everytime I compile - "vector subscript out of range". However, …

Member Avatar for Tom Gunn
0
96
Member Avatar for techly

Please help me to write a C++ program which finds the determinant of a n x n Matrix. I'm a beginner in C++ and have read all the posts related to this topic ,but it didn't help me at all. I know the code will be recursive, so i started …

Member Avatar for Sky Diploma
0
211
Member Avatar for pspwxp fan

Hi, I know theres a huge sticky up about C++ books, but i simply need some advice :) . I learned very basic c++ from a book called [url=http://www.amazon.com/Introduction-Programming-C-Diane-Zak/dp/0619217111/ref=pd_rhf_shvl_2]"An Introduction to programming with C++"[/url]. This included taught basics like arrays, functions, Sequential access files and stuff. It also covered basic …

Member Avatar for Tom Gunn
0
81
Member Avatar for gretty

Hello My program takes in a number & uses a recursive function to display that number backwards. eg input = 473, output= 374. I have to submit the program for marking, but they always throw in some curve ball test to make sure that your program will work for all …

Member Avatar for Tom Gunn
0
97
Member Avatar for Seida

Hello, I was wondering if there's someone here to help me, as I'm in some kind of a mess. I've implemented my own AdaBoost detector, but as the training process was going to take too much of my time, I tried to use opencv's haarcascade_default_face.xml. I converted it into a …

0
26
Member Avatar for jempag

Anybody knows how to program a solution to hill cipher, its an encryption and decryption..I'm using 2x2 matrix to decrypt any word, can somebody give me some tips, suggestions or anything that could help me finish my job. Thank you very much!

Member Avatar for Sky Diploma
0
469
Member Avatar for Ancient Dragon

I just finished installing Fedora 11 on my 64-bit Vista computer (dual boot) and see that it does not include gcc or g++. I looked on gnu.org, found something that described the gcc compiler package (briefly) but no links to where to download the binaries. Anyone have links to it?

Member Avatar for Nick Evan
0
255
Member Avatar for jarrax

hi problem: I am extending a lua script engine. I would like the engine to be able to detect at runtime if a script has been modified and if so reload it. However I don't know how to detect if a file has been modified. my idea: My idea was …

Member Avatar for Nick Evan
0
219
Member Avatar for umarmaqsood

alright here goes, i recently started reading the a c++ book and i was wondering, how so far i have only ran all the example programs in cmd windows. will i able to run outside or not in that horrible looking window or will i have to learn another language. …

Member Avatar for Nick Evan
0
338
Member Avatar for tech291083

Hi, I have this code in C++ and it is not compiling in a terminal window on a Fedora Linux machine. Please help, thanks a lot [CODE] #include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK); return 0; } [/CODE]

Member Avatar for Nick Evan
0
2K

The End.