49,757 Topics

Member Avatar for
Member Avatar for cameronchuck

Hi! I am trying to write calculator in c++ that takes an infix expression, converts it to postfix, and calculates. I have the code that will do this written, but when I try to turn it into a class it gives my a Segmentation Fault. Here is my code... [CODE=c++]//calc.h …

Member Avatar for histrungalot
0
3K
Member Avatar for coxxie

Need some help. My game locks up when you go to load file and it just locks up. Please help. [CODE] /* WumpusGame header file Contains the WumpusGame Class. This is the main workhorse of the program, and contains all of the global data, including the master world map. WumpusGame …

Member Avatar for coxxie
0
3K
Member Avatar for cutterpillow20

Hi sir, could you give me some clue of this problem.. I'm a beginner sir.. display a pattern of half diamond using for loop in turbo c in vertical.. sample: if i input a value of 5, the result will b e like this * ** *** ** * the …

Member Avatar for grh1107
0
816
Member Avatar for franmaez_0716

My professor told me to put an audio in my program but he did not taught me how to. please help me because i do not have any idea on how to do this thing. i know that you guys are experties so please help me.. tnx alot.. :)

Member Avatar for franmaez_0716
0
2K
Member Avatar for himgar

I have implemented Bubble Sort. How to add counters in the program so that I can calculate and display the Best Case, Worst Case & Average Case Time Complexity of this program? [code] #include <iostream> using namespace std; void bubbleSort(int arr[], int n); int compb = 0, compw = 0; …

Member Avatar for grh1107
0
195
Member Avatar for wildplace

so to create a thread all i need is to call this function? and the codes in the "void *(*start_routine)" function is a thread? [CODE]int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg);[/CODE]

Member Avatar for mike_2000_17
0
87
Member Avatar for rigoalhn

Hey i guuys, i researched for this topic and there were some close titles to this but none exactly helped me. I need a write a boolean function named IsPrime that takes and integer as argument and returns true if it is. I have to demonstrate it in a full …

Member Avatar for ravingdragoon
0
223
Member Avatar for Z33shan

Hello :) i'm looking for a proper way of drawing points in MFC. or Drawing those point on a Drawn Eclipse. then i actually have to join them. i had been working on .NET, so i'm less fimiliar to visual C++ 6.0, but i have to use it for this. …

Member Avatar for Ancient Dragon
0
559
Member Avatar for mweshk

Hi gurus, kindly help me in tracking these errors. The purpose of the program is to calculate the area and circumference of a circle using struct. the details stored are its name, radius, area and circumference. thank you [CODE]#include <iostream> #include <iomanip> #include<cmath> using namespace std; struct circle { int …

Member Avatar for deceptikon
0
135
Member Avatar for solarcoder

I was playing with some code again [CODE]#include <iostream> #include <cstdlib> using namespace std; int main () { int seed; cout << "Enter a seed: "; //enter 8 cin >> seed; srand (seed); cout <<"A is " << rand () << endl; //64 cout <<"B is "<<rand () << endl; …

Member Avatar for deceptikon
0
104
Member Avatar for eve_moore

I have seen this code that draws an outline circle and its center point to the ball detected. [CODE]// draws all detected circle and their center points. for (int i = 0; i < circles->total; i++) { // round the floats to an int float* p = (float*)cvGetSeqElem(circles, i); cv::Point …

Member Avatar for eve_moore
0
265
Member Avatar for theking12

plz tell me how we connect database with visual c++ (odbc connectivity).Plz tell me with image.

Member Avatar for thines01
0
51
Member Avatar for onemanclapping

hello. I'm doing a program in c++ and I need to use a system call to "clear" my screen. for linux I use system("clear") but in windows the same is system("clr"). is there some way to find which OS is being used at the moment of execution so the program …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for meetjatin88

Hi All, I have a doubt regarding SDL programming. Can some one please help me how can i subdivide a Image lets say into 4 parts and then store them in SDL_Surface array. I intend to animate later using these subdivided images by using SDL_BlitSurface function. I am new to …

Member Avatar for rosiebell
0
123
Member Avatar for polarpandabear

Hello Guys, I'm new here and I would like to ask help from you in making circular queue. I'm solving these for days but I can't have any idea anymore to solve for it's algorithm... I made this code so far... [CODE]#include <iostream> #define SIZE 5 using namespace std; int …

Member Avatar for polarpandabear
0
411
Member Avatar for catcit

I have some native C++ code that I want to use in C# and after doing some research I decided to create a C++/CLI wrapper for the native code. So far, so good. When running the program that contains the C++/CLI class, it works perfectly, but when I try to …

Member Avatar for catcit
0
905
Member Avatar for sergent

What is the difference between standard, int main(int nargs,....); and [CODE]int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd ); [/CODE] I am making a cross-platform program, for windows and linux, and until this point, I used main, without WinMain, for windows and linux. My app calls windows …

Member Avatar for jmichae3
0
2K
Member Avatar for BasixDev

Hello guys, I'm currently trying to rework an older project. It uses the Dao interface to connect to a MS-Access database. It now needs to connect to a SQL CE Database using the ADO driver. However, I keep getting the IDispatch error, see below. CJapRecordsets is a class with membervariables …

Member Avatar for BasixDev
0
204
Member Avatar for Basteon

Is it possible to develop Win32 C++ applications under a Linux distribution? If it is then how do I do this? I know about Virtual machines, but I'm looking for something that wouldn't require to emulate a whole OS.

Member Avatar for jbennet
0
418
Member Avatar for prasenjit_das

hi all, How i do very large numbers division and also modulo division in c++ thanks in advance

Member Avatar for subith86
0
67
Member Avatar for ogglock

Hi, I am relatively new to C++ and I am having problems sorting a set of items here is my code: [CODE] #include<iostream> #include<sstream> #include<string> #include<iomanip> #include<fstream> #include<vector> #include<string> #include<cstring> #include<set> #include<algorithm> using namespace std; struct SimpsonChars { string firstname,lastname; double firstnum,secondnum,thirdnum,fourthnum,fifthnum; SimpsonChars(const string& lname = "", const string& fname …

Member Avatar for ogglock
0
152
Member Avatar for kikic

if (A == nullptr || B ==nullptr) { cout<< "empty"; } When a put this code in Visual C++ 2010 Express, told me this error no operator "==" matches these operands Could someone help me how to solve, it is really important

Member Avatar for rubberman
0
201
Member Avatar for gabriellogan

I already wrote the code to read in these two files: processing_rules.txt - which will contain rules like these: 0R1, 0R2 1S3, 0S3 end input_data.txt - will contain data: 5 00110101 The positive number (5, in the example above) represents the position in the second-line sequence, from which processing will …

Member Avatar for gabriellogan
0
124
Member Avatar for phorce

Hello I'm making an application that reads a series of values from a text file and then converts it to a bitmap image. Currently, I'm using arrays, but, deciding on a particular length is annoying. I have been reading a few tutorials and i've read a lot about using vectors, …

Member Avatar for mrnutty
0
81
Member Avatar for DoubleZ

Hello, so my assignment was to take a text file that contains a properly written C++ program code and to go through that code character by character and output all the comments in that code to another text file. This is what I got so far, basically I`m wondering how …

Member Avatar for Panathinaikos22
0
222
Member Avatar for Sheepdawg

Bored and just wrote this. Anything I did wrong? Anything that can be improved? Relatively new to C++ but I have the basic basics down(I like to think so anyway). [CODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; void programIntroduction(); void gameLoop(); int playerChoice, cpuChoice, wins=0, losses=0, ties=0; int …

Member Avatar for Lerner
0
242
Member Avatar for rucafe

I have created two classes: [code]class dm_Step { public: char m_plus; char m_particle; float m_energy_sec; float m_xpos_sec; float m_ypos_sec; float m_zpos_sec; }; [/code] [code]class dm_Track { public: vector<dm_Step> m_track; } [/code] I have a data base with hundreds of lines of code in the following format: + gamma 2.306013 -0.213225 …

Member Avatar for gerard4143
0
193
Member Avatar for mrmodest34

Hey, I am having trouble implementing a c++ function that will allow the user to enter a lower and upper bounds and reverse everything in a char[] in between the bounds, so if array is, char[] = {'A','B','C','D','E'}; and the user input was 1 and 4 for 1 as the …

Member Avatar for Lerner
0
193
Member Avatar for MrEARTHSHAcKER

Hi, I noticed many programmers accuse C++ as very hard language for GUI and very good language for the code. Is there any way to integrate 2 languages, C++ and any other language which is easy to make GUI with? Thanks.

Member Avatar for mike_2000_17
0
273
Member Avatar for KRUX17

The code below takes the quantity of tickets from the 55 tickets that is available and it stores the value in a text file. What I want the program to do is to store the amount of tickets that is available and then each time the program executes it will …

Member Avatar for KRUX17
0
105

The End.