49,761 Topics

Member Avatar for
Member Avatar for angelshonu11

If anyone can send a program "Which counts how many times a particular word is repeated in a file" using File Handling... E-mail: <EMAIL SNIPPED>

Member Avatar for Moschops
-4
94
Member Avatar for airerdem

Hi everybody, What I did is, I have 2 one dimensional vector which are inside structure. [CODE]int numberofactivities; struct PopL{ vector<double> RK; //For Random Key }; //Random keys for left population vector<PopL> PopL(3); srand((unsigned)time(NULL)); for (int j=0; j<3; j++){ for (int i=0; i<numberofactivities;++i) { rn=((double) rand() / (RAND_MAX+1)) ; PopL[j].RK.push_back(rn); …

Member Avatar for Fbody
0
173
Member Avatar for ViXXeY

struct node { char str[10]; int val; node *next; }; void main() { clrscr(); node *head=NULL;int cnt=0; cout<<"Continue... [Y/N]";char ch;cin>>ch; while(ch!='n') { node *temp; cout<<"Str= ";cin>>temp->str; cout<<"val= ";cin>>temp->val; temp->next=head; head=temp; cnt++; cout<<"Continue... [Y/N]";cin>>ch; } node *temp1; temp1=head; while(temp1!=NULL) { cout<<temp1->str<<" "; cout<<temp1->val<<endl; temp1=temp1->next; } getch(); } Plz help me out....... …

Member Avatar for daviddoria
0
118
Member Avatar for DARKSUPR3MACY

Hello, I am new to this site, as well as to C++. I was hoping someone could help me out with my program, I was hoping to incorporate an if, else statement which we have yet to go over to see if I can. I have basic experience in java …

Member Avatar for Fbody
0
173
Member Avatar for KunalPatel

Hello, I'm a newbie to Objective-C & iPhone development, hence please bear with[ICODE][/ICODE] me. I'm working on an app which loads with UITableView and upon selecting one particular cell called "Address Book" it should load with another UITableView containing all the addresses retrieved from a web request. Using NSXMLParser's delegate …

Member Avatar for KunalPatel
0
150
Member Avatar for Jonellys

Hello! I'm new here... and I'm having trouble trying to download and upload files from an ftp server.... Btw this is not for homework! I'm trying to help a professor with this but I'm stuck!... Help?? :/

Member Avatar for Moschops
0
171
Member Avatar for hq1

Hello. I'm supposed to store the two numbers in two int arrays of size 30, one digit per array element. If the number is less than 30 in length, enter enough leading zeroes (to the left) to make number 30 digits long. I will need a loop to add the …

Member Avatar for danb737
0
1K
Member Avatar for AnkitPasi

Hello. The problem with the following code is that when I read from a file after restarting the program and then try to display the contents, it goes into an endless loop. I hope that someone can point out the logical error hiding there. [CODE]#include <iostream> #include <windows.h> #include <fstream> …

Member Avatar for thelamb
0
323
Member Avatar for bensewards

Hey everyone, I need to write a program that reads names and GPA’s from a text file. The file looks like: James 3.9 Margaret 3.5 Charles 1.2 Jennifer 4.0 The program sorts the students ascending by gpa, and prints the sorted list including names. To keep the names with the …

Member Avatar for ravenous
0
1K
Member Avatar for pakhwa

Hey There! I am doing a research using the principal component analysis as a technique for fault detection, could somebody help me with the C++ code for it( that has the hotellings T squared statistic and the SPE or the Q statistic).

Member Avatar for peter_budo
0
95
Member Avatar for princensit

Hello to All, I would like to know what is the significance of static member function. Also please mention why all member functions can't be made as static. Thanks,

Member Avatar for jonsca
0
27
Member Avatar for WildBamaBoy

I'm at a point with this program that I need to do a lot of work with strings. This would be so much simpler to do in Python, however I don't want the entire program written in Python. How could I use functions from a Python script in C++?

Member Avatar for WildBamaBoy
0
258
Member Avatar for sanzilla

dear sir , My question is what is the sutiable libraies to learn inorder to be a windows programmer . someone say that MFC is not structured well and there are lots of easy frameworks shuch as .NET to do the things very easily than using the .NET . and …

Member Avatar for caut_baia
0
702
Member Avatar for amiroletter

For those C++ fanatics: You are free to visit this website: <MY SPAM LINK REMOVED BY peter_budo> To learn the basics of C++ HAppy COding, Enjoy!!!:icon_smile:

Member Avatar for Fbody
-1
42
Member Avatar for jfunchio

I need help getting my function to overload the + operator to add a integer and a Rational object. Right now I am able to add two rational objects with my overloaded + function but not and integer and an object. I'm not really sure how to go about doing …

Member Avatar for Fbody
0
329
Member Avatar for livinFuture

I am currently writing a program that can calculate the number of total seconds in a user given number of hours, minutes, and seconds (in that order in hh:mm:ss format hh, mm, and ss being any number from 0-99). I'm not really worried for checking for errors in user input, …

Member Avatar for mrnutty
0
12K
Member Avatar for jfunchio

I'm having trouble figuring out how to overload the +=, -=, *=, and /= for a program that does operations with rational numbers. Could someone please help me out. [CODE=C++] #include <iostream> #include <string> #include <cmath> using namespace std; class Rational{ public: int num; int den; bool neg; Rational(int n, …

Member Avatar for embooglement
0
545
Member Avatar for pucivogel

How can i store in an integer array a negative number of type string?i mean i want it to be recognized that it is a negative nr.

Member Avatar for mrnutty
0
81
Member Avatar for katniss

Write a C++ program that implements an ADT class named Int50 for manipulating integer numbers with up to 50 digits. The operators provided on this type must include: sum (+), difference (-), product (*), division (/) {dropping the remainder}, output (<<), and input (>>) of values for Int50 objects. Each …

Member Avatar for arkoenig
0
124
Member Avatar for pucivogel

I want to get this string arrays and turn them into double arrays, but i get this : [CODE]#include <sstream> #include <cstdlib> #include <iostream> #include <string> using namespace std; int main () { string str[3]={"2.5","3","1.5"}; istringstream stm; double d[3]; for(int i=0;i<3;i++) {stm.str[i]; stm >>d[i]; cout << d[i] << endl; } …

Member Avatar for arkoenig
0
216
Member Avatar for JordanHam

int arr[]={4,5,6,8,1,6,4,7,1,2}; and I want and array to equal the ln of those values in an array? I dont why I am having so much trouble with this. Thanks!

Member Avatar for JordanHam
0
126
Member Avatar for pucivogel
Member Avatar for Moschops
0
131
Member Avatar for neuro

i tried my writing my first script today :) it is the solving the quadratic equation script and i found it in an older C++ book i'm working through i made some edits to the script since i'm using Dev C++ as my compiler (had this problem but fixed it …

Member Avatar for neuro
0
176
Member Avatar for Foxfreezer

Hi, I have a programming project in which I have to create a game where the user can select the upper bound of numbers and difficulty they want and then guess the secret number within that bound and difficulty. So far, this is my code. It compiles and allows the …

Member Avatar for WaltP
0
190
Member Avatar for rmbrown09

Hello, new C++ user at University I am trying to find what would be the best way to count and display the even and odd numbers in a sequence. For example, if the user inputted the sequence 2 - 6, then there would be 3 evens and 2 odds, this …

Member Avatar for mrnutty
0
612
Member Avatar for Carrots

Hi, I have an expression tree in which the nodes are operators (union, intersection etc represented by a string "/u") or the nodes are std::sets. How could I access the std::set's values in order to carry out the tree evaluation using the operator functions(set_union(), set_intersection() etc) ? The expressions are …

Member Avatar for arkoenig
0
164
Member Avatar for MasterGberry

I am trying to write a simple Batch File to launch an exe using some basic CMD PRMPT functions. I know exactly what I need to do, but my only problem is I don't know how to detect the Desktop Folder? What if its in Documents and Settings, or if …

Member Avatar for MasterGberry
0
2K
Member Avatar for XodoX

So, I have this array and pointer: char array [6]; char *ptr; And this list of array [6] addresses and contents: 0x5010 a 0x5011 b 0x5012 F 0x5013 H 0x5014 X 0x5015 Y I'm looking for the values of the following: a) &array[0] b) array[0] c) *ptr d) (*ptr)+2 e) …

Member Avatar for Fbody
0
251
Member Avatar for JordanHam

I have a function that takes an array, calculates the ln of that array into another array called lnt. I would like to pass lnt back to the main. I know it has something to do with int *foo or something but I cannot seem to get a code to …

Member Avatar for Fbody
0
168
Member Avatar for SolidSora

I'm trying to get my main function to read my class file. It doesn't compile. Here is my main file: [CODE]#include<iostream> #include<iomanip> #include"countertype.h" using namespace std; void main(){ CounterType counter = CounterType(); counter.setCount(2); counter.getCount(); }[/CODE] And my class code: [CODE]#include<iostream> #include<iomanip> using namespace std; class CounterType{ public: int count; CounterType(){ …

Member Avatar for JasonHippy
0
219

The End.