49,757 Topics

Member Avatar for
Member Avatar for merse

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&); …

Member Avatar for Ramakant62
0
89
Member Avatar for sam1

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 …

Member Avatar for somemnguy
0
527
Member Avatar for merse

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 …

Member Avatar for merse
0
136
Member Avatar for wittykitty

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 …

Member Avatar for donaldw
0
113
Member Avatar for confusedndazed

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. …

0
53
Member Avatar for exospire

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 …

Member Avatar for super-sonic
0
350
Member Avatar for Japus

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 …

Member Avatar for Japus
0
109
Member Avatar for atohas

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 …

Member Avatar for atohas
0
63
Member Avatar for Eternity[LK]

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 …

Member Avatar for Eternity[LK]
0
104
Member Avatar for DweyneAnne

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 …

Member Avatar for Nick Evan
0
135
Member Avatar for wittykitty

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, …

Member Avatar for jonsca
0
116
Member Avatar for zobadof

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 …

Member Avatar for zobadof
-1
177
Member Avatar for dsolly

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. …

Member Avatar for dsolly
0
91
Member Avatar for n3r3d

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 …

Member Avatar for n3r3d
0
193
Member Avatar for alflash

[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 << "------------------------------------------------------------------------------------------" << …

Member Avatar for jonsca
0
73
Member Avatar for asish kumar

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 …

0
64
Member Avatar for MattyRobot

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, …

Member Avatar for Sodabread
0
279
Member Avatar for Kingfahad

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: * ** *** **** ***** ****** ******* ******** ********* **********

Member Avatar for thelamb
-1
90
Member Avatar for NeoValkyrion

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 …

0
62
Member Avatar for Areej N

i have a program and i need to add a photo after a result .so can i add a photo to my c++ program??

Member Avatar for Areej N
0
205
Member Avatar for ghprogrammingco

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 …

0
130
Member Avatar for Premlal

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 …

Member Avatar for Premlal
0
2K
Member Avatar for Hia

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

Member Avatar for Nick Evan
-4
43
Member Avatar for scrypt3r

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 …

Member Avatar for anjana.ananth
0
166
Member Avatar for bhas_purk

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 …

0
56
Member Avatar for stevechow

:] Awesome title. I have a program called Life. This program creates an array from the numbers in a .txt file, then it puts it into an array. The cells in the array will have "bacteria" if they are named in the .txt file. The bacteria will be removed if …

Member Avatar for jonsca
0
137
Member Avatar for kevinkace

Can't figure out what's wrong with my delete function. If I remove the delete for the name and address it works as expected, but am I not leaking memory that way? [B]Structs:[/B] [CODE] struct Person { char* name; char* address; int zipcode; }; struct Node { Person* per; // Person …

Member Avatar for kevinkace
0
173
Member Avatar for alokjadhav

I am using SWIG to extend Python to C++. Understand that there is a different forum for SWIG users but I am still waiting for a response on that list. But the questions I have consists of basic Python C API releated. I hope this list will be able to …

Member Avatar for alokjadhav
0
696
Member Avatar for jonathanYoung

allrighty, this MAY take a bit to answer, but i have here a standard visual c++ function that clears the screen, i found off the internet. what i need, is some help knowing what all the different functions inside do.... since codes useless unless you know what it does :) …

Member Avatar for Clinton Portis
1
416
Member Avatar for Jeffro_i4i

I am to create a project that evaluates math expressions and their derivatives. I have a Formula class with only virtual functions: virtual void print() virtual void print(int) virtual Formula *derivative() virtual int evaluate() Then I have 7 other classes which inherent from Formula, they are: Variable Constant Add Multiply …

Member Avatar for Ancient Dragon
0
117

The End.