49,761 Topics

Member Avatar for
Member Avatar for eternaloptimist

i need a function to line up the info with these columns.: Name Test 1 Test 2 Test 3 Average here is the code that i have so far.: [CODE]#include <iostream> #include <iomanip> using namespace std; void arrSelectSort(float *, int); void showArrPtr(float *, int); void showAverage(float, int); int main() { …

Member Avatar for Fbody
-2
1K
Member Avatar for Tech E

I am trying to figure out the best way to create a dynamic array/vector (not sure which) that would take in a string and double and store it. I then need to print the string with the corresponding double into a list and produce a total for all the doubles …

Member Avatar for Lerner
0
107
Member Avatar for sikeufoo

[CODE]while (y==1) { float discount,addcost; pricetopay=calpricetopay(ty,pricetopay,addcost,discount); cout<<endl; cout<<endl; cout<<"\t\t\tTOY TOY Shoppie"<<endl; cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; cout<<endl; cout<<"Name of item:"<<ty.name<<endl; cout<<"Price of item:"<<ty.price<<endl; cout<<"Made in:"<<ty.madein<<endl; cout<<"Manufactured Date:"<<ty.date.d<<"/"<<ty.date.m<<"/"<<ty.date.y<<endl; cout<<"Price to be paid: "<<pricetopay<<endl; cout<<"Do you want to proceed with another transaction?"<<endl; cout<<"If yes, Please type '1'. If no, please press 2 to quit."<<endl; cin>>y; }[/CODE] …

Member Avatar for Fbody
0
131
Member Avatar for amol14007

I have been trying searching the net, for source code for converting RTF file to text file in c/c++. The source that i get is in RTF file format which conatins is specific tag but i need to convert it to simple text file and upload it.. Any source link …

Member Avatar for amol14007
0
218
Member Avatar for donazri

Hello guys. I'm trying to create a program, that reads a file, and create an output. Here's the questions: Write a program to compute numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the …

Member Avatar for LevyDee
0
177
Member Avatar for blainegeneral

I have been trying to figure out where this is comming from: [CODE]1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall StudentList::getStream(class std::basic_ifstream<char,struct std::char_traits<char> > *)" (?getStream@StudentList@@QAEXPAV?$basic_ifstream@DU?$char_traits@D@std@@@std@@@Z) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall StudentData::StudentData(void)" (??0StudentData@@QAE@XZ) referenced in function "public: __thiscall StudentList::StudentList(void)" (??0StudentList@@QAE@XZ) …

Member Avatar for Salem
0
204
Member Avatar for bigt666

I've been working on this program and can't seem to understand how to print an output file of the calendar of July. Is there any help I can get? This is the code: [CODE]//---------------------------------------------------------------------- // // This lab exercise is to practice rand(), srand() and // output formating with help …

Member Avatar for WaltP
0
225
Member Avatar for Voltron160

This program sorts in descending order. Hey guys, I am wondering if I could get some help with making this bubble sort program sort recursively. Any help would be appreciated, thanks. [code] #include <stdio.h> #include <conio.h> #include <iostream> #include <stdlib> #define TRUE 1 #define FALSE 0 void bubble (int[], int); …

Member Avatar for LevyDee
0
1K
Member Avatar for LevyDee

[code] for(.........) { for(.........) { swap } } [/code] Is there really a better way to sort a one dimensional array then to just use a simple bubble sort? Ive heard arguments against bubble sort before, but what do you guys think?

Member Avatar for LevyDee
0
85
Member Avatar for antball06

Ok. So I have been researching and compiling info for the past 15 hrs about this. Hope someone can have some helpful input. What I am trying to do is create a program to use for my construction business to help with estimates of a job to make things easier, …

Member Avatar for LevyDee
0
181
Member Avatar for JonEvans

I'm trying to figure out how to use the max_element algorithm on a vector of structs, rather than POD's like int etc. This is my struct: [code=cpp]struct NameComponents { std::string sValue; std::string sDescriptor; int nOrder; int nStatus; // Construtor. NameComponents( std::string inValue, std::string inDescriptor, int inOrder ) : sValue( inValue …

Member Avatar for Banfa
0
139
Member Avatar for aianne

Hi! I need help to my c++ program. I created a program that is much like the "Who wants to be a Millionaire" television show. It has questions and the right answers and three lifelines. How can I possibly do eliminate a lifeline after being used.? this is the program …

Member Avatar for WaltP
0
216
Member Avatar for fruymercado

[split from [url]http://www.daniweb.com/forums/post1162537.html#post1162537][/url] how can i create like that program but i need to have more questions and i dont nid to use the life time because lifetime is dificult so please help me or give me a program to use in our c++ subject here in MAPUA. please i …

Member Avatar for jhaiskie
-1
520
Member Avatar for endframe

Hello everybody :icon_neutral: I'm having an error in finding the biggest/smallest numbers in an array; the debug result gives me wrong numbers. Here's the code that I have been working on: [CODE]#include<iostream.h> int linearsearch(char b[],char searchkey, int size); void main(void) { const int arraysize=7; char a[arraysize],key; int result,i; int s; …

Member Avatar for WaltP
0
105
Member Avatar for inmar

Hi I'm using ACE_Thread_Manager to spawn a thread. But it is not spawning the thread. After including `ACE_Process_Manager::instance()->open();` in the main then thread is spawned. The sample code is: class DataType{ public: DataType():data(0){} void increment(){ data++;} void set(int new_data){ data=new_data;} void decrement(){ data--;} int get(){return data;} private: int data; }; …

0
76
Member Avatar for hkBattousai

[B]MyClass.h[/B][CODE]class MyClass { //... public: template <class T> static void Swap(T& Var1, T& Var2); //... }[/CODE] [B]MyClass.cpp[/B][CODE]template <class T> void MyClass::Swap( T& Var1, T& Var2 ) { Var1 ^= Var2; Var2 ^= Var1; Var1 ^= Var2; }[/CODE] In another file[CODE]#include "MyClass.h" //... int n = 40; int m = 60; …

Member Avatar for hkBattousai
0
2K
Member Avatar for kd1987

Hello I must implement overloaded + (binary) operator. I have to use method like that: const Text & operator+(const Text &) const . Anyone knows how it may be done ? I know that I can't make new object in function and return it. Ps: Class Text have pointer to …

Member Avatar for Fbody
0
91
Member Avatar for tajendra

Code portability basically refers to making source code able to compile on different platform without making any changes in source code. While coding its very important to keep portability in mind.The best way to introduce code portability is while coding.Keeping certain things into account we can achieve code portability with …

Member Avatar for tajendra
0
463
Member Avatar for Cerealkiller050

Need some help here. I am outputting a course and student report. Student report shows what classes the student is in, while Class report shows what students are in a certain class Ok, so class report is only showing the classes (including professor name and classroom #), but not the …

Member Avatar for Banfa
2
98
Member Avatar for mmgoicochea

Hello everyone so this is the piece of code i'm wokingon.. the program ask to input an integer. If the integer is even the program will divide it by two and if the integer is odd the number will be multiplied by three and then after it is multiplied it …

Member Avatar for mmgoicochea
0
1K
Member Avatar for mebob

for my own satisfaction, im trying to make a program that does AES encryption, but ive run into a problem: i cant find an efficient way to us the s-box, and i would rather not have a switch statement with 256 cases. what could i do to do this effieciently.

Member Avatar for robertl2
0
158
Member Avatar for C Newbie

Hi there, I'm am trying to write a recursive C++ function that writes the digits of a positive decimal integer in reverse order. [code=C++] #include "stdafx.h" #include <stdio.h> #include <iostream> #include <conio.h> #include <cstdlib> #include <math.h> #include <string> using std::string; using namespace std; int reverse_num (int number, int m) ; …

Member Avatar for phoenix911
0
2K
Member Avatar for dude1

ive been trying to figure this out but i have no clue how to ive got a string thats a whole file and ive used find and replace but that only works on the 1st of the word if i have multiple of that word how could i replace them …

Member Avatar for kbshibukumar
0
87
Member Avatar for blind122

I am suppose to count the number of vowels in a user inputed string. I dont know what i am doing wrong it gives me one error? [CODE] #include <iostream> #include <string> using namespace std; int count_vowels(string str) { int count = 0; for (int i = 0; i < …

Member Avatar for blind122
0
124
Member Avatar for Web_Sailor

Hi, I have a written a program using multimap and its not giving me the results I am expecting. I have used pair in my program. There is some problem which I am unable to figure out. Perhaps I am using pair for the first time with multimap. Here is …

Member Avatar for Web_Sailor
0
150
Member Avatar for keerpitis

Hello!I have to check one txt file for simetrical words(like 1221 or abccba) and put these simetrical words into other file.End of word is ().,!? or space I have figured out how to find out if string is simetrical. [CODE] int main() { char s[100]; gets(s); int len=strlen(s); bool b=true; …

Member Avatar for abhimanipal
0
80
Member Avatar for xxxSuperTrooper

This is what i have for code this far, i need help trying to keep score here. Any help would be well appreciated thanks [CODE] int sum = 0, teamScore, numPoints, score1 = 0, score2 = 0; while (teamScore != -999) { cout << "Did team 1 or team 2 …

Member Avatar for WaltP
0
1K
Member Avatar for donaloflanagain

I am a final year university student quickly nearing my project deadline. My project is to write an artificial intelligence program for a robot to find its way through a maze. I have been using a Lego Mindstorms Robot and the NXC (Not eXactly C) programming language to write and …

Member Avatar for Banfa
0
168
Member Avatar for emilo35

Okay, so what I'm trying to do is to write a program that reads several TGA images and bunch them together into one bin-file for later use. I got this code from [URL="http://nehe.gamedev.net"]NeHe OpenGL[/URL], Tutorial 24, and it is what I use to load my images: [CODE=C++] bool loadTGA(char *path, …

Member Avatar for emilo35
0
287
Member Avatar for Carrots

Hi there, I have a problem in that my derived concrete classes are loosing the data members which are part of my derived classes. I have wrote a simple program to show the problem. [B]GrandParent.h :[/B] [code=c++] #ifndef GRANDPARENT_H #define GRANDPARENT_H using namespace std; #include <string> /******************************************************** Abstract base class …

Member Avatar for Carrots
0
195

The End.