49,761 Topics
| |
Here's my curiosity [code] #include <vector> class A { protected: int somedata; public: A () : somedata (1) {} A (const A& cpy) : somedata(cpy.somedata) {} virtual ~A () {} }; class B : public A { A* someobj; std::vector <A*> vec; public: typedef std::vector<A*>::iterator It; It i; B() : … | |
Hi, i have to write a program to allow the user to input 5 candidate names and the number of votes they received, then it calculated what percent of the vote each candidate received and then ten tells the user who won. I think I've got a code that will … | |
I desperately need help with a project I am working on. I need to create and implement a Binary Search Tree Header file. I am having great difficulty with this and was hoping I could find some help here. This is what I have done(note: I am aware that the … | |
This is homework. I am not asking for someone to write this code for me, just to help me understand how to solve my problem. I have to take two lists or integers inputted by the user, sorted in ascending order and combine them using pass-by-reference to return a pointer … | |
I have been stuck on this problem for a while, and I just can't figure it out. I'm sure there's an incredibly easy way to do it, but I'm at a loss... I need to take in this text file: Smith, M.N., Martin, G., Erdos, P.: paper name Erdos, P., … | |
i know vectors exists but i'm wanting to learn how to manually do this... i want to be able to allocate memory to the end of my array when needed or even deallocate memory when deleting a specific character. Im curious how one would achieve this manually. If anyone has … | |
[B]I want to play mp3 song file in ubuntu using c++ [/B] suggest me is their any function to do this plz suggest me as simple as u can suggest any method.... plz give ur valueable suggestions..... | |
Hello, I just wrote my first code with a while loop and I am getting strange results. The program is supposed to give a Fahrenheit (TF) to Celsius (TC) conversion for every 5 degrees Fahrenheit increases between 0 and 100. It increases the value of TF just fine but in … | |
Hello friends, I am trying to play music through turbo c++.I used Irrklang sound library 1.3.0. But while compiling i get an error saying "unable to include IK_IRRKLANGTYPES.h" and other header files. Should i change anything in header files? Is there any other way to play music in turbo c++? … | |
I submitted an assignment but I was told it was wrong. I have till the end of the day to get it right but I'm working and my deadline is creeping up. So I'm hoping you guy can help me out. Assignment Write a program with two funtions: main and … | |
can anyone kelp me to change font color using C++ 4.5?? if i use conio.h it has an error of undefined function.... | |
[B]Okay, I finally understand that they point to memory, because I knew that all along. I just wasn't aware of why they needed to point to memory for. So I need to use pointers in this position but I don't know where to use them or on which things and … | |
Hello, I would like to confirm if I have the correct way of calculating the mean and standard deviation of an image. I am not sure I have the right answers. Please can someone please confirm this. Also, I would like to ask if anyone knows how I can obtain … | |
i am working on an encoder nad i have developed a way to encode my message in terms of (x,y) coordinates..but i have to put these locations on a world map to strengthen my encoder.... im using dev c++ 4.9.9.2 and need a gui base coding for my c++ program … | |
Write a program which generates randomly some numbers (integer) say 20 numbers between 1 and 100 and send it to an output file called randOutput.txt. Next your program should open this file (randOutput.txt) and check whether the numbers are ordered either ascending (or descending) or not. So you should have … | |
How do i get the threadid of a window. I know it explains a bit "(HANDLE Thread)" but still how? Regards, Prosammer | |
Hi Ok i am makeing a program and want it to check if there is an update availible by checking if a txt file with the version has a difrent number. I have been looking around and found absolutly no help for this problem. The text file would be at … | |
#include <fstream> #include <cctype> #include <iostream> #include <string> const int num=1024; using namespace std; int main(){ ifstream file; string s; int i=0; file.open("words1.txt"); while(getline(file,s)){ for(int i=0; i< s.length(); i++){ cout << s[i];//prints out the text file just fine. "a dog." cout << s[0]; /*prints out random stuff. <---my problem. All … | |
Hi there. I want to create a program on windows 7(32bit) that can rename photos based on date and time taken in meta data. I would like it to have a user interface window where users can simply drag photo files onto the scrollList.. then a button that executes a … | |
[B]Hi every one, I'm working in a code from 1 mounth, and now I finaly finished, it work, but there is the old problem in C++ language, the interface, once that I wan't to do a program that will be used for anothers users, I wanna to make the program … | |
Good Afternoon, I need help on this assignment from school, I'm getting this error C2660: 'clockType::setTime' : function does not take 4 arguments. I need to make the class functional by the client program testClockClass.cpp. Below are the code that I have so far: testClockClass.ccp [code] #include <iostream> #include "extClockType.h" … | |
I've seen macros like this: [icode]#define $Line #__LINE__[/icode] and I was wondering what the effect of the $ symbol has in a macro? | |
Ok, so in this program, the user enters a number and it assigns that number to "answer". Now I have a bunch of strings already named by numbers, it starts out with "one", "two", "three" and so on being valued as a dash sign "-". So say they enter "five", … | |
so. . . i guess you could say i'm kinda new here but. . . this site really helps me alot this past few days and i decided to join... i was surfing all over the internet and i can't find what's the problem with my program. this always says … | |
I've made a simple webserver in C++ based on this one [URL="http://http://msdn.microsoft.com/en-us/library/ms737593%28v=VS.85%29.aspx"]here[/URL]. And this works fine. Now, my assignment is to pass some info from this server to an html-file that later can be opened in IE or Firefox and then display info like screen resolution. Now.... This is supposed … | |
In dev c++ does anyone know how i can take a circle, rectangle, and triangle to create a penguin. I am really new at this by the way. | |
i was always taught put the variables u plan on using in a function at the top of it! im curious if it's considered bad programming practice to only define variables when they are going to be used/need to be used....for example possibly midway or further into a function? | |
Say I want to begin writing a program some how or some way in machine code and nothing more. This program I am making is expected to be a 3D video game. I would like to write it in some way the processor can implement it and write back the … | |
I have a project I am working on but I honestly can't get a hold of a good jump off point. I'll post the pseudo code. I really need the help please. It is for a GUI C++ program. Please help me if anyone can. All I need is a … | |
Hi All ~ So the program actually compiles without using arrays or global variables, outputs the correct user input, however average score and lowest score values that compute are wrong. I have no idea where the heck I'm messing up but I am hoping you can help me. The findLowest … |
The End.