49,761 Topics
| |
I thought I was following a recipe that worked, but not so. Can someone explain to me why this does not compile? (And I have yet to include a couple of constructors!) - Thanks, Rich. [CODE]//CIS 180 Rich Mansfield 0457321 12/6/09 //Lab11.1 - This program illustrates the use of classes … | |
I would like to make it so you enter how much you will give in (E/G £20 and £15 in change) and then it tells you how much change you get back. I will post the code and if someone could fix it so you enter amount you'll pay and … | |
I need to string names from a text file which the name will output no more than 29 characters and no commas. My output displays no commas, but i cant figure out how to count the characters and output no more than 29 characters in the name. I think I … | |
I wrote a program that compares two strings and tests to see if they are the same. Case difference doesn't matter. The problem is this: When the program is run it works only half the time. The other half the program doesn't wait for the second string to be entered, … | |
I'm finishing up my simple shift cipher which takes a .txt file line by line and converts each character of the line to its decimal value and then adds an integer value (shift value) to that decimal value. The decryption procedure works the same way except that instead of adding … | |
It is not necessay to write out a name of a passed variable in case of declaration: For example its enough to write: [CODE]void myfunc(double,doble);[/CODE] and not [CODE]void myfunc(double x, doble y);[/CODE] But lets see a more difficult example: [CODE]template <class class_type> friend real myfunc(class_type& obj, double (class_type::*func)(double), const double&); … | |
hi, i have the following code: [code]#include <iostream> using namespace std; class test{ public:: bool t() { cout<<"enter your answer(y or n)\n"; int answer = 0; cin>>answer; if (answer =='y') return true; else return false; } }; int main(void){ test t; return t.t; } [/code] i get this error: cannot … | |
If I have a template class: [CODE]template <class T> class myclass { public: T function(); }[/CODE] and it has a member function for example T function(), it is possible to define it separately for different kind of template parameters? So define somehow: int myclass::function(); double myclass::function(); mystruct myclass::function(); with totally … | |
I have a question about my logic in trying to code something. Let's say I have an array of 50 values. Now I want to find the values that are over (lets say 100). And I want to print "There are 11 values over 100" Now, my question is, I … | |
Hello all, I have made some adjustments to my last two posts and combined them here to ensure it makes sense. I am supposed to use a top down design along with a pseudocode for a program that lists an array of numbers, computes the average, and outputs the results. … | |
This is a school assignment and I think it's nearly done, there are probably some parts that need straightening out, but at this point I'm just trying to get my program to compile correctly. The program depends on an input file with sample data as follows: 1000 John 9.5 9.0 … | |
Hello, Im trying to make some small programs with QT4. Everyting goes well untill I want to create my own widgets with the Q_OBJECT in a class. Then I can't compile the thing anymore. It says: [code]Undefined symbols: "vtable for Communicate", referenced from: __ZTV11Communicate$non_lazy_ptr in main.o ld: symbol(s) not found … | |
Hi, I'm a beginner in C++ and just learned linked lists.I'm trying to write a code which creates a linked list according to the int numbers taken from the user and prints them all.i'm writing the code in Dev c++.However i have a problem in printing the list.By the way … | |
Hello. I have created another homework assignment in C++. Program is working correctly, however there are 2 flaws I need help with. [B]Description:[/B] User enters the name of sportsman, and 7 marks given to this sportsman by referees. Marks must belong to interval [0.0 : 10.0] . Float sum is … | |
i have a homework for our programmin classes, i searched for other solutions regarding the gotoxy function, but all saw was for devc++, turboc++ and other IDEs, when i use the function for devc++ or turboc++, i know it wont work, but i tried it, says there's not library for … | |
Sorry to trouble, as I am still learning C++, however, can anyone give me any insight how to work this problem. I have 2 functions, one to get the highest number out of the array, and one for the lowest. Both these functions work and give me the correct number, … | |
I am learning opengl and now have code to make a new window. I would like to move onto adding triangles/quads; I just dont know where to add the code for a triangle/quad. I will paste the code into this thread; if you know could you just add [COLOR="Red"]<--- Code … | |
I have a shared library (a java JNI SO to be exact) which wraps a static library provided by another organization. I expect a newer version of the static library to be produced, but not until after I have released my code, along with the SO, to a third party. … | |
I have this class : int br=0; // br is counter how much records i hold in my vector [CODE]class racunalo{ public: void upis(string naziv, string velicinaRam, string velicinaHDD, string brzina, string proizvodac); void upisKomp(); string getNaziv(int s) const; void pregled(); void upisDat(); void pregledNaziv(); void pregledProizvodac(); void brisanjeRac(); string … | |
[CODE] fstream* file = new fstream("GameDetails.txt", fstream::out); ofstream out; out.open("GameDetails.txt",ios::ate); while ( more ) { game.Tic_Tac_Toe_Board(); player = game.Pick_Player(); fstream* file = new fstream("GameDetails", fstream::in); *file << left << setw(30) << setw(25) << "Player" << setw(25) << "Wins" << setw(10) << right << "LOSES" << endl; *file << "------------------------------------------------------------------------------------------" << … | |
Hii, i am asish.i am an embedded Programmer.i am programming RTOS Q2686 for gps/gprs based vehicle tracking system.i am creating one file management API in C.i am writing with help of A&D API.i am storing some root information in a cell.But when i am reading the root,Entire Cell i am … | |
is it possible to stretch a 3D scene in openGL? I know it is possible in glOrtho() but how would I make a 3D scene stretch. for example if I rendered a cube, in the middle of a window, and then made the window longer, instead of the cube stretching, … | |
How can i make a program that uses for statements to print "*" OUTPUT as many asterisks for each row as that row number. please tell me how can i write a program. output should be: * ** *** **** ***** ****** ******* ******** ********* ********** | |
Hi everyone! I've been working on a C++ project to make a Library database program that involves storing a list of both users and books with their respective information, and allowing the act of checking out/checking in a book. I got both lists made up in vectors, and they work … | |
i have a program and i need to add a photo after a result .so can i add a photo to my c++ program?? | |
I should write a program to combine the huge number of images side-by-side. The source images are jpeg and png formats images. I think no any direct way to combine png or jpeg images to gather, unless first convert them to bmp, or any raw format, and perform combination and … | |
Hi all, I am somewhat new to templates, but slowly realizing it is very powerful. Facing a problem. I have a template class. [CODE]template <typename T> class myTemplateClass { //Some code here };[/CODE] In another class I need to create a fixed number of Objects of the above template class … | |
declare an array of 20 elements and initialize it with any no from 1 to 10 count the no of times each no from 1 to 10 has ocurred in da array | |
Ive have developed a Program That enables the user to Make a process of There choice load a "hello World" Dll, But the user has to Input the Processes PID. I have two problems, 1. How do I Retrevive the process PID from process name? 2. My Program has the … | |
hello, I am reading this ID3 tag from an mp3 file. I dump bytes equaling the tag size into a char*, then I read each byte by recursing through the array one byte at a time. I also have the mp3 file open in text editor, so I know what … |
The End.