51,593 Topics

Member Avatar for
Member Avatar for spacerat

The other code snipplets I found were either recursive or too complex. I therefore developed a simple, fast and yet non-recursive method; thats useful especially when working on the graphics card with CUDA as recursion is not possible there. (c) Sven Forstmann

Member Avatar for chtulu
1
649
Member Avatar for vbx_wx

hi all. I am trying to enumerate all of the subkeys of a key and then all of the subkeys of each subkey and so on....i dont know if u get my point.For example : enumerate HKEY_CURRENT_USER: AppEvents,Console,Control Panel.....and then enumerate all of subkeys of AppEvents,COnsole....an then every subkey of …

Member Avatar for mitrmkar
0
961
Member Avatar for smoothe19

Sorry I figured out some errors in the project but I can't figure out the rest of it.. I have attached the file below. I am also supposed to add a bool hasProperColoring () const that returns true if no vertex in the graph has the same color as an …

Member Avatar for Salem
0
75
Member Avatar for mmabdelsamea

Hi, I'd like to inquire how can I display 3D image using PictureBox control in Visual C++ 2008. or how can I display only one slice of this image in PictureBox control in Visual C++ 2008. your help is great appreciated. Best Regards, Mohammed.

Member Avatar for Salem
0
77
Member Avatar for ranjita.cdt.esg

I need to detect that joystick is unplugged during runtime. Using C++ Borland builder 5 enterprise edition. used windows api. Referred to [COLOR="red"]http://plib.sourceforge.net/js/index.html[/COLOR] Right now joystick once detected, it remains as plugged even though in the midst of the application i unplug the joystick. Goal: Is to stop processing the …

Member Avatar for Salem
0
99
Member Avatar for Anand111
0
49
Member Avatar for shm512

Hi everybody, first time writer, looong time follower. I've been given an assignment to write simple c++ code and make exe app out of it. It's purpose should be to check particular folder structure on running system and compare it to the some reference files and folders. Point is to …

Member Avatar for Salem
0
223
Member Avatar for Justin9825

[CODE] #include <iostream> #include <fstream> #include <string> #include <cmath> #include <cassert> using namespace std; class Payroll { public: int menu(); int option; int mainMenuOption(); int payrollMenu(); int employeeMenu(); int employeeOption; int payrollOption(); int anotherOption(); int exitOption(); int mainMenuOption; { system("cls"); cout << "\t\t Docket Materials Company\n\n"; cout << "\t\t Main …

Member Avatar for Salem
0
126
Member Avatar for mebob

I am getting an error in Windows Vista that says "Project3.exe has stopped working", and has a bar like a loading a bar, and under it, it says it is looking for a solution. The program is an class assignment that takes a data fiile with information about energy usage …

Member Avatar for mebob
0
161
Member Avatar for dillinger88

Hey guys, In the following code to find the determinant, the program crashes when it attempts to delete the matrix and gives an error about heap corruption. I'm having trouble determining why I'm getting this error. The code has worked fine until I realised my derivative definitions were wrong and …

Member Avatar for Salem
0
179
Member Avatar for LisaJane

Hello, I have an assignment where I have to create a hash table and load 30 part numbers into it- should be a 2-d array...and eventually I have to prompt the user to choose an algorithm and keep track of collisions. But I am starting really small with this and …

Member Avatar for peter_budo
0
399
Member Avatar for scholar

Hello friends, I am looking for an open source project to get into this summer.I have been programming for quite long but i am not into open source software development yet.I have programming experience in c, c++,c#,php ,javascript, xml .So please suggest some good open source project to start with. …

Member Avatar for Sodabread
0
72
Member Avatar for ayan2587

hello guyz.. Need urgent help on this !!! Is there a way to find out the total memory being consumed by my C++ program. I have seen in many online coding competitions that set a limit on memory consumption. Is there any tool by which I can find memory being …

Member Avatar for ashishchoure
0
8K
Member Avatar for crss

I need to write a reverse polish notation calculator and do not have a clue how to start. The only thing I have is the header file. This thing is due tomorrow at 3pm and I am backed into a corner. If someone can help me or write this for …

Member Avatar for Fbody
0
259
Member Avatar for d0ugg

Hello everyone, I need to load a multi-word strings from a file to a linked list in one of my programs, and i'm not sure how to do that. my text file looks like this- (the name of the text file is: names.txt) Linda Martinho Marla Jose Mary Luka Joseph …

Member Avatar for ssuss
0
147
Member Avatar for mattloto

I have an array of strings, with each string being a name. I'm looking for a function that will find the index of a particular name in the array. I looked into Array::IndexOf, but my array is like this: [CODE]string names=new string[30];[/CODE] and it wont work. I could make my …

Member Avatar for david.k
0
177
Member Avatar for nille_nerholt

I have a listview control in my project, runs in Visual C++ 6.0, that I want to make a sort based on column click. It works good when I have <1000 entries but when it goes over 1000 entries the sorting performance goes down. It takes about 10-15 seconds to …

Member Avatar for david.k
0
361
Member Avatar for marcoakis

Hi guys, I solved this C++ problem for my mid semester assignment. It is a guessing game where the user will guess a number between 1 and 10 and will bet and win/lose money accordingly. I just started programing with C++ so I'd like to receive feedback on how to …

Member Avatar for VernonDozier
0
146
Member Avatar for emilyp

Hello. I'm using Visual C++6.0, and Windows XP. I am trying to connect to a database. I want to add some records to it, reading the values out of edit boxes. Here is my Code: [code=cpp] CDialog::EnableConnections(); ::CoInitialize(NULL); _ConnectionPtr con; con.CreateInstance(__uuidof(Connection)); con->Open(L"Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\\Documents and Settings\\204504519\\Desktop\\webcam.mdb",_bstr_t (""),_bstr_t(""),adOpenUnspecified); _CommandPtr cmd; cmd.CreateInstance(__uuidof(Command)); cmd->ActiveConnection = …

Member Avatar for iravishekhar
-1
550
Member Avatar for karthz85

[CODE]#include<iostream.h> #include<fstream.h> #include<string.h> class database{ public: virtual double store_data(void); virtual void save(ofstream &file); virtual double GetPassingMark(int pass); virtual void display(void); virtual void edit(void); protected: void data(void); //database(){cout<<"constructing";} //~database(){cout<<"destructing";} }; double database::store_data(void) { char code[100]; double totalmark,laboraty,exam,assignment,sum_assignment; int i,no_of_parts,a,pass; totalmark=0; for(i=0;i<7;i++) { cout<<"=======================================================\n"; cout<<"1.enter the subject code"<<i+1<<"\n"; cin>>code; cout<<"2.Enter no of …

Member Avatar for chiwawa10
0
131
Member Avatar for wardah0

I'm sorry if this has been posted before but... I used this example code from my book to understand image processing better. The image is of the queen mary ship, in a .bmp extension file. Anyways I basically take the picture and save a negative image of it onto the …

Member Avatar for wardah0
0
76
Member Avatar for acerious

This is my first time ever programming in C++ so please talk me through this step by step. This is my second compilation after the classic Hello World! program and I am running into a problem I cannot figure out. The code executes just fine but when I run it, …

Member Avatar for chiwawa10
0
131
Member Avatar for naseerhaider

Hi, Can any one please describe that if we can use || and && operator in C++ as following ? [code] if (choice == 'e' || 'E' && cur == 'd' || 'D' ) { cout << " Enter amount in Euro " ; cin >> amount ; } [/code]

Member Avatar for chiwawa10
0
135
Member Avatar for Spartan-S63

Alright, so it has become apparent to me that Microsoft has switched up the Win32 API in Visual Studio 2010 (I'm not too experienced in the API already, I was just starting to get the hang of it). Does anyone know what exactly they changed and where a good tutorial …

Member Avatar for Ancient Dragon
0
143
Member Avatar for theblastedfool

Hey guys, I am working on this encryption/decryption project and I have just finished writing the encryption part of the code. I complied it and ran it. The first part worked well. However once I chose to encrypt a file ( I didnt choose decrypt because it was not completed), …

Member Avatar for theblastedfool
0
96
Member Avatar for RayRay1

I am writing a rational number class and need to know if this is the correct way to do it. Can someone please let me know if I'm on track or not? Thanks. [CODE]class RationalNumber { public: RationalNumber( int = 0, int = 1); // constructor RationalNumber operator+( const RationalNumber& …

Member Avatar for RayRay1
0
846
Member Avatar for coding101

why is my code not letting me repeat? after the first run, and you type y to repeat it skips the run and say repeat again? [[CODE]void line(){ char ans; do{ string line; int count=0; cout<<"Enter a line of text.\n"; getline(cin,line); for(int x=0;x<line.length();x++){ if(islower(line[x])&&isalpha(line[x+1])&&isalpha(line[x+2]) &&isalpha(line[x+3])&&(!(isalpha(line[x-1])))&&(line[x+4]==' '|| line[x+4]=='.'||line[x+4]==','||line[x+4]=='\0')){ count+=5; } else{ …

Member Avatar for coding101
0
113
Member Avatar for mmgoicochea

So this is assignment number 14 and this is the fourth time Im bothering you...I hope you can help me. I think Im almost done with it but I can not get "toupper" my name and lastname so it would be copied to the outfile.txt file. Description: The program writes …

Member Avatar for mmgoicochea
0
122
Member Avatar for mswezey

Hello. Finishing up the my program that's due soon and I've came across some hiccups you could say. Basically I am to write a Class definition file and use it to to read in an infinite amount of fraction problems. (+,-,*,/,<,>,<=,>=,==, and !=) While I have successfully written most of …

Member Avatar for mswezey
0
3K
Member Avatar for mark88211

This lab i am stuck on and was wondering if someone could help me with the source code. Thanks. I need a program in c++ that asks a user for 20 integers and finds the max, min, average and median of the numbers inputted. It wants code to contain arrays …

Member Avatar for mrnutty
-3
126
Member Avatar for d34dw4rd

Hi, I'm new to C++ and my first assignment is to convert C code into C++ code. Here I have a loop, however; I can't seem to get it to break out of the loop. It is suppose to input an odd number that is less than 15 and set …

Member Avatar for d34dw4rd
0
117
Member Avatar for jdpjtp910

I have some code that implements a linked list. The program has the basic implmenetation including: • IntList() // Constructor • ~IntList(); // Destructor • void appendNode(int); • void insertNode(int); • void deleteNode(int); • void displayList(); • void reverseList(); I am trying to get the reverList to work correctly. Below …

Member Avatar for abhimanipal
0
211
Member Avatar for YeMiller

Alrighty, just wondering if anyone can spare a few minutes to help me out a little. Trying to do the finishing touches on a project I've got for tomorrow. My problem is this - I'm trying to make the user interface a little more appealing instead of it just asking …

Member Avatar for YeMiller
0
169
Member Avatar for eggberto

What is wron with my code?: [CODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int i; void myfunc(char scrpt); char scrpt; char scpt[10][200]; int junk; int main() { int z; char scpt[10][200] = { "AAA", "A1", "BBB", "B1", "CCC", "C1", "DDD", "D1", "EEE", "E1" }; srand((unsigned)time(NULL)); z = rand()%1-10; …

Member Avatar for sdsda
0
169
Member Avatar for Seriss

The goodIds and badIds arrays don't seem to be loading right. The good one shows all the values loaded in including 4 0s at the bottom where the bad ids were.. the bad one does the same only all the good ones come out as 0s and the bad ones …

Member Avatar for sdsda
0
89
Member Avatar for jigglymig1

I need help with inputing the file. The file has the "lastName" "firstName" "phoneNumber" "email" then a new line. When i read in all 4 rows it says the first line in all 4 rows. the infile is in main [CODE]#include <iostream> #include <fstream> using namespace std; void mainMenu(); void …

Member Avatar for sdsda
0
166
Member Avatar for mn_minal

I am trying to migrate from VC++6 to VC++9. I am getting error " fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory" on build. I tried removing .h and adding using namespace std; after #include, here it gives me error in iosfwd file like "iosfwd(574) …

Member Avatar for jwenting
0
182
Member Avatar for Dinglish

I have a c++ problem regarding looping. I am writing a program which will include a problem similar to below. 1) ok, i am writing a program that asks the user to enter a number. 2) Then ask the user if the number entered was correct. 3) If the number …

Member Avatar for caut_baia
0
196
Member Avatar for MattyRobot

I am trying to move a project from CodeBlocks to visual c++. (it compiles fine using minGW) I am using the 2010 express version. when I compile the projectusing VC++ I get the errors below. I have done some research and it is comming from including windows.h. to test this …

0
85
Member Avatar for 3cats

I have an if stmt which checks to see if a char value (upper or Lower) is equal to a value input by end user. My understanding was if you are using a char value in a conditional stmt you need to put single quotes around the char value. If …

Member Avatar for Salem
0
3K
Member Avatar for john10

Hi, I've only learned c++ for about 2months, I've basically learned up to arrays, two and multiple dimensions but not in-depth. Currently reading through pointers. I've managed to achieve a similar graph to what i am supposed to have. What I'm getting. [IMG]http://i109.photobucket.com/albums/n79/johnz13/graph1.jpg[/IMG] Should look like. [IMG]http://i109.photobucket.com/albums/n79/johnz13/graph.jpg[/IMG] Problem I am …

Member Avatar for VernonDozier
0
179
Member Avatar for walaa_23

Hi all, I create a MFC DLL "Static" and with wizard I add a dialog and "Microsoft web browser" ActiveX in this dialog, also I create a class for this Dialog. All I want here to call this Dll from a Win32 app "normal c++" and load this Dialog into …

Member Avatar for Ancient Dragon
0
846
Member Avatar for bs5134

I need to write a program that sums all values in an array row that the user can choose. The program sums correctly but instead of only outputting one row's sum, it sums up all of the rows up until the input row and adds them all together. I can't …

Member Avatar for gusano79
0
3K
Member Avatar for alcondor

I have worked on this code hours, and get it to work finally on Linux Debian.. its basically sort a linked list --bubble sort. Also I added a piece of code to the main function to measure the execution time of the bubble sort function what I am trying now …

Member Avatar for Narue
0
166
Member Avatar for Sonali_86

Hi, I had a query whether Windows multithreading API throw any Synchronization exception. If I am sharing a STL string between threads and the string is not guarded,will there be any synchronization exception. Another query is does STL container throw exceptions apart from memory violation Thanks in advance :-)

Member Avatar for madhav_75
0
115
Member Avatar for batchprogram

I'm an experienced programmer of 5 years in Java & C#, but recently I decided to program in C++ as well. I'm familiar with proper code syntax and advanced programming techniques, but this compiler error i'm getting just stumps me beyond recognition, I've analyzed my code for syntax errors a …

Member Avatar for EddieBre
0
209
Member Avatar for mbrodie

Hi, kinda new to the whole C# thing and trying to make a small app for myself in C# in Visual Studio. Basically i have 2 combo boxes, 1 had Classes the other has Spec's in it. When you select the class it populates the second combo box with the …

Member Avatar for kvprajapati
0
170
Member Avatar for madmax007

Hi, I want to develop a an application based on independent "CustomModule" that all derived from a base class "BaseModule" and that can send different kind of "CustomEvent" (derived from a "BaseModule" class) to each other. Each Module just knows that it is connected to others "BaseModule" (i.e. it does …

Member Avatar for madmax007
0
165
Member Avatar for Prota

Hi! I have a problem finding a string from a register if it contains a certain character combinations and * is used to "fill" the positions of the string as we do not know the contents of. Example: We register "abc" and "abd". If we only know "a" and "b" …

Member Avatar for Prota
0
73
Member Avatar for phummon

Hello everyone, I’m an intermediate-level C++ programmer grappling with a fairly rudimentary problem. I’m creating a C++ object called FruitCart; FruitCart contains a number of integers categorizing the numbers of individual fruit in the cart. I also need FruitCart to contain accessor functions so other functions can set, retrieve, and …

Member Avatar for phummon
0
133

The End.