49,755 Topics

Member Avatar for
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
94
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
249
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
699
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
328
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
543
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
215
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
125
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
182
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
610
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
162
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
250
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
159
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
218
Member Avatar for Zvjezdan23

[CODE]// This is a program that displays the choice the user picks using a Switch Statement #include <iostream> #include <string> using namespace std; int main() { // Underneath A switch program that shows the user his input choice string word1 = "Achieve"; cout << "Welcome to Your AccuWeather Report Screen." …

Member Avatar for alaa sam
0
188
Member Avatar for ravenous

I have to calculate the modal value of [icode]std::vector< int >[/icode] quite often, so I thought I'd share my general method for people to look at, use and/or comment. In my case, the vectors usually contain values in the range 0 - 255. The code first creates a [icode]std::vector< int …

Member Avatar for vijayan121
0
1K
Member Avatar for apanimesh061

Hi there, I am new to using Visual C++ 2005 enterprise Edition. I do not know how run a C++ program in it. It's environment is similar to Turbo C++ 5.5 IDE but still I can't see any 'Run' command anywhere and Ctrl+F9 does not do anything !!!!! Please help …

Member Avatar for alaa sam
0
198
Member Avatar for ntrncx

hey,thats my first post,i started recently to have for hobby programming,and i am really interesting to learn. anyway i have a problem i write a program that use some classes objects my problem is probably fundamental but i couldnt find answer on net. i have one header file that i …

Member Avatar for ntrncx
1
447
Member Avatar for David_Omid

Hey guys, I have a problem with a chess game I'm creating using Windows Forms. The purpose of this code is that I have a load of panels with picture boxes inside them. When the user moves their cursor over the panel or the picture box, the panel lights up …

Member Avatar for David_Omid
0
212
Member Avatar for jfunchio

I'm writing a program for a class that does operations with rational numbers. I'm not finished with it, but right now i'm working on the is_negative() function which is required to be in the program by the teacher. He has set up a make file to test each part of …

Member Avatar for Fbody
0
351
Member Avatar for Tech B

[CODE] #include "windows.h" #include "loadbmp.h" // from http://gpwiki.org/index.php/LoadBMPCpp #include "fdlib.h" void main(int argc, char *argv[]) { int i, n, x[256], y[256], size[256], w, h, threshold; BMPImg *bi; unsigned char *bgrdata, *graydata; if (argc==1) { printf("usage: fdtest bmpfilename [threshold]n"); exit(0); } bi = new BMPImg(); printf("nloading %sn", argv[1]); bi->Load(argv[1]); w = …

Member Avatar for Mahnaum
0
177
Member Avatar for OneTimer

Hey... Not very experienced with computers here and I seem to have done something very wrong. I found a C++ beginner book and decided to give it a go. It came with Visual C++ 2005 express edition. I went online, found out there is a 2010 version and installed that …

Member Avatar for mjdodd
0
118

The End.