49,761 Topics

Member Avatar for
Member Avatar for jaya_2

hai,in turbo c++ when i compile my program it doesn't give any error but after giving input values dynamically without performing operation(output) it displayed as "abnormal program termination" pls help me someone to avoid it

Member Avatar for MonsieurPointer
0
76
Member Avatar for kamalashraf

#include<iostream> using namespace std; void getdata (int a[], int size); int main () { int size=10; int a[size]; getdata (a[], size); return 0; } void getdata (int a[], int size) { for (int i=0; i<size; i++) cin>>a[i]; }

Member Avatar for deceptikon
0
147
Member Avatar for maurice.tracey.7

string steady(int company[][column], int row)//Question 6 { int increase = 0; int x,y = 0; string Up = "Increased"; string Down = "Decreased"; for(y = 0; y < 2; y ++)//column {//Start loop increase = company[0][y]; for(x = 1; x < 4; x ++)//Rows if(increase < company[x][y]) { increase++; return …

Member Avatar for tinstaafl
0
341
Member Avatar for SpottyBlue

The vending machine C++ code has a problem. I wanted to call the "tPrice" variable from the "chocoSelect" function to "insertCoin" function, but it does not work. Same thing as for calling variables "cChoice, qAMB, qSD, qCS, qCMB, currentTotal" from the "chocoSelect" function to the "dispenser" function. What should I …

Member Avatar for tinstaafl
0
1K
Member Avatar for reyn.cueto

THIS IS FOR MY PROJECT .. SO PLEASE HELP ME SIR... I HAVE A CODE BUT IT IS IN IOSTREAM LIBRARY> AND MY PROJECT SPECIFICALLY SAYS THAT USE STDIO.H: this is the code: i want to run it in stdio.h library #include <iostream> #include <string> #include <windows.h> using namespace std; …

Member Avatar for Ancient Dragon
0
723
Member Avatar for programmingme

I had to write a fraction calculator program and my only problem (I think) is when I input the two fractions it gives me garbage - for instance if I put 1/2 + 1/2 it gives me 1374389536/687194768 - can anyone help me correct this please? Thanks! divisionByZero.h [CODE] #include …

Member Avatar for irum.nageen.3
0
3K
Member Avatar for blamp

I have add the two functions the add and subtract I have to now add the multiply and divsion functions can someone help

Member Avatar for irum.nageen.3
-1
448
Member Avatar for andrew.mendonca.967

CSCI-15 Assignment #2, String processing. (60 points) Due 9/23/13 You MAY NOT use C++ string objects for anything in this program. Write a C++ program that reads lines of text from a file using the ifstream getline() method, tokenizes the lines into words ("tokens") using strtok(), and keeps statistics on …

Member Avatar for nullptr
0
290
Member Avatar for bossier330

Hi. I picked up Dev C++ the other day after a while of not using it. Here's my question: I can't figure out what's wrong with my code Basically, the program prompts for a command. If the command starts with 'open:', then it puts the following character(s) within "<>"s. This …

Member Avatar for iam1sts
0
6K
Member Avatar for kay19

Well I initialize an array of 5000, along with using srand & rand numbers with a range. I want to Prompt the user to enter an integer to search (from the front of the array) & output the index location of the element found(-1 if not found). I attempted it, …

Member Avatar for kay19
0
273
Member Avatar for codetoeternity

hello dear people. as adviced by respected members of this community, i have decided to use an engine to develop the game, my initial findings are that unity uses c# or javascript as language, udk uses unrealscript, i was wondering if there is a good (i mean atleast on par …

0
99
Member Avatar for FairyA

I get stuck for this one for 3-4 hours, try various sources but no help, would you please point out what is wrong with my code ? This is the first time I am using a pointer.This one is the error : "Segmentation fault (core dumped)" when compiling // Integer.cpp …

Member Avatar for FairyA
0
183
Member Avatar for andrew.mendonca.967

CSCI-15 Assignment #2, String processing. (60 points) Due 9/23/13 You MAY NOT use C++ string objects for anything in this program. Write a C++ program that reads lines of text from a file using the ifstream getline() method, tokenizes the lines into words ("tokens") using strtok(), and keeps statistics on …

Member Avatar for andrew.mendonca.967
0
726
Member Avatar for romy_1
Member Avatar for nitin1

I have a map like this : map<int,map<int,int> > m; in this, I can insert value like a 2-D array. like this, m[i][j]=3; so, now i want to iterate all the values in a particluar row of map. for ex. if m is like this : m["user-id"]["movie-id"], then i want …

Member Avatar for NathanOliver
0
964
Member Avatar for Sallybaks

Suppose you save $100 each month into a savings account with the annual interes rate5%.So, the monthly interest rate is after the first month,the value in the account becomes 100*(1+0.00417)=100.4417 After the second month, the value in the account becomes (100+100.417)*(1+0.00417)=201.252 After the third month ,the valiue in the account …

Member Avatar for Ancient Dragon
0
221
Member Avatar for Jugottabe

Hey guys, noob programmer here. Over the last week or so we've been learning about classes and inheritance in my latest progamming class. I've recieved a variation of the ever so popular poker program and am having some problems putting it all together. I haven't had the opportunity to test …

Member Avatar for Jugottabe
0
385
Member Avatar for mark5rockzz_1

I'm afraid to ask this on SO because all I can get is down-vote so I ask it here.* ## **Question:** ## Does C/C++ compiler (e.g the popular "gcc") with OO concepts allocates/creates all data member if other data member are not in use? /************************************* * code for example: * …

Member Avatar for mark5rockzz_1
0
292
Member Avatar for vegaseat

An example how to plot the function y = sin(x) using the WinApi function SetPixel(). The plot is centered along a line at pixel y = 200. Add an x-axis and a couple of tickmarks and it could look impressive.

Member Avatar for jack.zgx
1
4K
Member Avatar for mdgowhar

#include<iostream> #include<fstream> #include<ctime> #include<cmath> using namespace std; clock_t start, end; double cpu_time_used; int main() { int m,i,j,n,k; double P[150][150], tou1, cx[8],cy[8], U[150][150],V[150][150]; double u,x[150],y[150],dt=1.0, T[150][150],S[150][150],t=0.0; cout<<"enter the units in X x Y"<<endl; cin>>m>>n; class pdf { public: float feq[150][150], f[150][150]; }; pdf f0, f1,f2,f3,f4,f5,f6,f7,f8; // For X for (i=0;i<=m;i++) { …

Member Avatar for mdgowhar
0
158
Member Avatar for Jed_1

Okay, so I've gotten my second project in C++ and this seems pretty extream for a second project to me, but I'm determined to get this working. so my teacher suplied two header files (set.h and bingoball.h) our job is to take those files and program a bingoball.cpp and a …

Member Avatar for Jed_1
0
540
Member Avatar for Xen_1

Hello, i just made this program to push the '5' button repeatedly when I hold the 'f12' button and this works just fine but i have a question! When I run this program while I'm playing super mario bros this program does not work! I use the 5 button to …

Member Avatar for Ancient Dragon
0
208
Member Avatar for LokiSoliman

so, we have this school assignement in which we are asked to make a program that would ask you to enter two integers, them the program should add the two integers and all the even integers between them. example: integer1: 1 integer2: 10 (1 + 10 + 2 + 4 …

Member Avatar for Ancient Dragon
0
163
Member Avatar for bourisly

am new student to c++ and am taking this course , I faced a little problem solving my assignment question .. this is the question..... to write a program that reads in 5 whole numbers and outputsw the sum of all the numbers greater than zero , the sum of …

Member Avatar for AndrisP
0
200
Member Avatar for xNeverLetGo

Everything is coming out except for the average, what am I doing wrong? #include <iostream> #include <string> #include <iomanip> using namespace std; int main() { string ssnumber; int exam1 = 0, exam2 = 0, exam3 = 0, final = 0,count = 0, sum = 0; int average1 = 0, average2 …

Member Avatar for Ajit_2
0
333
Member Avatar for ztdep

Dear friends: I compile my procedure with mpicc, it can give correct execute file. mpicc -o testprint testprint.c libptools_ppf.a But when i compile it with mpic++, it gives me some error about undefined reference. Could you please help me out. mpic++ -o testprint testprint.c libptools_ppf.a testprint.c:25:31: warning: deprecated conversion from …

Member Avatar for rubberman
0
392
Member Avatar for andrew.mendonca.967

CSCI-15 Assignment #2, String processing. (60 points) Due 9/23/13 You MAY NOT use C++ string objects for anything in this program. Write a C++ program that reads lines of text from a file using the ifstream getline() method, tokenizes the lines into words ("tokens") using strtok(), and keeps statistics on …

Member Avatar for kal_crazy
0
281
Member Avatar for toneranger

Hi, Imagine a vector of structures with each structure containing various variables. struct Data { double x double y double z } vector<Data> Dataset vector<Data>::iterator it //input some data from a file into DataSet How can I iterate over this vector, comparing say, x at the nth row to the …

Member Avatar for toneranger
0
306
Member Avatar for Sam R.

I need to know how to remove spaces from a string using pointers in C++. Since I'm in senior year in school I'n not used to quite complex programming. I tried doing this program but I think I'm totally hopelessly terrible wth pointers (I was out sick, the day my …

Member Avatar for NathanOliver
0
1K
Member Avatar for Jason_6

Im completely new to programming, and this is my problem. For example, if a train travels 40 miles per hour for three hours, the distance trav-eled is 120 miles. Design a program that asks the user for the speed of a vehicle ( in miles per hour) and how many …

Member Avatar for Jason_6
0
395

The End.