49,761 Topics
| |
Having trouble trying to copy the vector 'sel' in main to vector 'ask' in class A. Can someone either explain or show me? Thanks in Advance![code]class A{ private: public: vector<Trader> ask; void AskMatchList(vector<Trader>&); void showAuct(); }; void A::AskMatchList(vector<Trader> &list){ vector<Trader>::iterator it; f1= new Trader; //I understand this is the WRONG … | |
i m using borland c++ 3.0 i want to inseert image (jpg,bmp) files.. did anyone tell me how to do this..? i dont know anything about this..? | |
this is the question Most teachers assign various graded activities for their students to complete. A graded activity can consist of a numeric score such as 65, 89, 93 and so on. GradedActivity class is to hold the numeric score and letter grade of a graded activity. When a numeric … | |
a) INT b) my-name c) your_name d) $dollar e) stock Price f) _UnitPrice g) while h) 1$dollar i) switch j) whileYou k) ifYou l) if m) int n) int34 o) ab.3c p) ab_3c q) 4%6 r) fourTimesSix s) 4 * 6 t) apples3 | |
Friends, i have written a code for finding HCF but it does not work. please help me in improving this code.Thanks in advance. [CODE]#include<iostream> using namespace std; int main () { int a,b,c,d,e,f,g,h; cout<<"Please input two nnumbers:"<<endl; cin>>a; cin>>b; d=a%b; c=(a-d)/b; a=b*c+d; if d==o cout<<"The hcf is:"<<b<<endl; if d>>0 { … | |
Hello guys. I'm not very good at at programing but i need to do one program which should do this: Write a program with objects which stores student marks of exam. All the information is read. It must be realized: a. I enter all students marks; b. and see whose … | |
Hi all, I just started programming.Can anyone please help me how to remove the non-printable characters of ascii from my code..I will really appreciate it. [CODE] #include <iostream> using namespace std; int main() { int num; cout<<" ASCII CODES\n -----------"<<endl; num = 32; while(num<=252){ cout<<endl<<char(num)<<" : "<<int(num); num++; } cout<<endl; … | |
i am writing a program to find all integers that have 5 perfect squares within 30 of them... here is what i have so far: [CODE]#include <iostream> using namespace std; int range[60];//since "within 30" means to more and 30 less void integer(int testInteger) //testInteger is the integer to use to … | |
I would like to read input data from text file with fstream. But I don't know how to mix different type of get functions. I would like to read for example numbers after char "=" I try to use something like this [CODE]char c; double x; while (!inFile.eof()) { inFile … | |
I have selected to do a hangman console game in my C++ course (9th week) in which I have a question about wait(). I want to make the game "appear" to be loading just to give it aesthetics but I'm not sure how to do it the way I want … | |
Well I have a gui and I want to change its process name or dont display it on process at all how do I do it? | |
I was wondering if its possible to embed c++ into an Html website. Is there some engine that does it for you, or is it just not possible? Thanks. | |
Hi all, I am a beginner of C++ and I don't know many things. I happens to encounter a simple problem which I don't know how to solve. Please help me out. I intended to write a program that solve the following problem: [QUOTE]Problem A Hashmat the brave warrior Input: … | |
| I have been playing around with different 'flavors' of programming, like QBasic, Assembly, and C++. I like all of them, but I have really begon to like C++. The only problem I have, is that I dont have any problems to solve. I'm just programming cause its FUN ^^. I … |
[[CODE]#include <iostream> #include <string> using namespace std; class digits { }; class numOutofRange { }; int string_to_int(string s) throw(digits, numOutofRange); int main() { int histogram[10]; int total; int currentNumber = 0; string s; for(int i=0; i < 10; i++) { histogram[i] = 0; } cout <<"How many numbers do you … | |
I currently have a small c++ program that will ping all hosts in a subnet and then run "net view" to get a list of shares available on those systems that respond to the ping. I want to take this to the next level. I want to be able to … | |
I have a code here that needs to return a string from a function, but the compiler continues to tell me an error saying that "overloaded function differs only by return type from 'int Bible::getName(void)'". How can I fix this? Here is my code: [CODE]// Joseph Yong // CSC2430 // … | |
can i change the value of an int with a pointer. e.q. int n = 20; int *size = n; can i change n by doing this *size++. thanx | |
I am writing a project to calculate the area and volume of 2d and 3d shapes. I have a class hierarchy with my abstract base class called 'shape'. I want to make a separate class to calculate a prism of a specified depth from any 2d shape, yet am unsure … | |
i have to calculate the time of call in a prog. but i dont know how can i calculate the clock time on execution. will anybody plzzzzzzzz hlp me? | |
ok,i have this code to enumerate the keys,that is working fine,and the code to enumerate the values and datas for a key that is working good also,but,if i combined them i doesnt produce the expecting result,i tried to call enum_value() in the enum_keys() function : [code] void enum_key(HKEY Hkey , … | |
Hello, I need some advice from some of the more expert programmers on what path should I take further in my learning process. I started with PHP and now I can say I do ok, not an expert of course. I like programming very much and I love PHP, it's … | |
its a random number generator [CODE]#include <iostream.h> #include <stdlib.h> #include <time.h> #include <iomanip.h> using namespace std; int main () { const int MAX_RANGE = 100; int value; int random = rand( ); int num = ((random % 100) + 1); int quit; do { srand (time (NULL)); value = rand() … | |
I wrote this code for fun. Wanted to do such a thing so that I would be able to use this in the future. I'm kinda new to this forum. I like to know what you think about the code. If can point out some mistakes or ways to improve … | |
Hi i am using Visual c++ with SDL I have been using a tutorial from lazy foo productions but when i go to build my solution my complier says: Cannot open include file: 'SDL.h': No such file or directory | |
Hey All Yesterday I was writing a recursive form of a prime factorization program and I wasn't sure about the syntax I used. the function works as is but I'm curious if I am being redundant or if this is the proper way to code it. Here is what I … | |
Hello frind>> I need solve this equation >> Chebyshev differential equation in c++ >>Let us solve togather>>> first the equation is : [url]http://upload.wikimedia.org/math/c/a/e/cae214684f8d6fcaa89fbbe1a195524b.png[/url] let start with someone >> Thankyou | |
I know: -basic cout/cin -declaring single integers/strings -currently learning 'for' loops as you can see, my knowledge is extremely limited as of now, and i wish to have a few practice problems to have a go at. May i have some suggestions? | |
I'm working with several programmers to get a program to compile & run on Windows and Linux. It compiles fine under Windows using SDL for most of the functions (sound, graphics & input), but we're getting an error when using a makefile under Linux. We've tried several things without any … | |
I have a program where the cout "ing" a string misses the beginning letter of the string. I have made it so that there are 3 options to input/output the information. The "missing" letter in the string is ONLY evident in option 1; option 2 and option 3 does not … |
The End.