49,756 Topics

Member Avatar for
Member Avatar for arunciblesp00n

Hello, Firstly I better warn you I'm quite new to C++ and to Linux so I'm sorry if my terminology/general understanding of how things work is a bit confused. I've downloaded a code which is in C which is helpful for a course I'm doing on stellar structure, but I'd …

Member Avatar for ArkM
0
5K
Member Avatar for skalber

Hello, I have a class with template argument, MyClass. Next I initiate 3 copies of that templeate class with different types : [code] MyClass<char> mc1; MyClass<int> mc2; MyClass<float> mc3; [/code] Is it possible in c++ to make a general pointer array with each element as reference to differenet initiated class? …

Member Avatar for ArkM
0
135
Member Avatar for suljo2

Hi, I am calculating arithmetic mean of some $ values, so my numbers should have dollar part and cent part ( two decimal points ) double x = 3.46; double y = 12. 13; double arithmeticMean = ( x + y ) / 2; //7.795...should be 7.80 I don't care …

Member Avatar for ArkM
0
142
Member Avatar for kashif85

hi guys now a day i work on project to create a menu bar in c++ so i feel to want help how to creat exect manu bar if any one have a code so plz share it thanks

Member Avatar for William Hemsworth
0
51
Member Avatar for gumber

first i copy an object byte by byte to a memory location . Then cast starting address of that memory location to pointer of object type and access member function of object using that pointer . code is very lengthy and split across files .. so i was avoiding to …

Member Avatar for gumber
0
160
Member Avatar for debonair

i want to connect my SQL server 2005 data base through c++ code.. please soem one help me.. more precisely, when ever there is a update in the data base i have to pass the values of the field to another application thru c++ code..

0
73
Member Avatar for ecentric

Write a short program thats reads a file called text.txt that replaces all words that begins with the letter f and is replaced with the word frog. Now i have a jeist of how to replace words with another word however i am unsure how to find words only starting …

Member Avatar for ArkM
0
2K
Member Avatar for mrnutty

hi everyone, I was practicing binary search with array and encountered a problem. My code works but I can't help to make one part of it better. Well look at my code to understand my question better. [code] int binary_search(int arry[], int size) { int first = 0; int last …

Member Avatar for Jacky1
0
128
Member Avatar for I_want_to_lean

I know how to draw PNG in my dialog using OnPaint() but i don't know how to draw a PNG after i click a button. Here's the code for the OnPaint() that i use [CODE]#include <gdiplus.h> #pragma comment (lib,"gdiplus.lib") using namespace Gdiplus; ... all MFC stuff void CAppName::OnPaint() { CPaintDC …

0
49
Member Avatar for ademsaykin

Dear All Although my tutor said that it takes 25 minus, I have been trying to understand for more than a week that how to do my task. I have done something as you said before in terms of "putting at least some efforts". Please see the codes below and …

Member Avatar for ademsaykin
0
295
Member Avatar for CPPRULZ

I was writing a simple class to test my understanding of class and the first class program had a number -int num private- that was modified by the user by void definenum(num) and retrieved with int getnum(). It functioned as I expected-i would define it as 4 and it would …

Member Avatar for CPPRULZ
0
142
Member Avatar for mrboolf

Hi all there. Given the huge amount of blackjack/card games threads and me being personally interested in poker and other games, I was feeling like starting to play with a few useful (at least I hope so) classes for dealing (no pun intended :P) with card games. I started my …

Member Avatar for Murtan
1
523
Member Avatar for serkan sendur

i try to develop a make file and i got this error : Dependency line needs colon or double colon operator. my makefile is in this state yet: [CODE]Books.o: Books.cpp include/author.h include/Booksh.h include/library.h xlC -c SourceFiles/Books.cpp -l vista -L/sbx/asc/slib -I/user/serkans/myprog/BookLibraryTrial/include -I/sbx/asc/vista libMan : main.cpp cmnlib/libfoo.a xlC main.cpp cmnlib/libfoo.a -l vista …

Member Avatar for daviddoria
0
1K
Member Avatar for dewyatt

I wrote a simple program to convert Roman numbers to Japanese (roomaji). This program needs to lookup a string using a number (think std::map). And I'm wondering about the pros/cons of the 3 methods I thought about: [B][COLOR="Red"]Method 1[/COLOR][/B] I guess the major con here is you need to initialize …

Member Avatar for dewyatt
0
240
Member Avatar for majesticmanish

Hi, [I]I am newbie in C++. In a C++ Program[/I], i am getting error message as "[U][B]Double freeing of freed memory may be in class 'WSO'. copy constructor and operator= is not defined.[/B][/U]" I haven't defined any copy-constructor and operator overloading in Class 'WSO' (since i haven't use any assignment …

Member Avatar for dewyatt
0
2K
Member Avatar for 1bennyd

Hi Guys, I am a complete newbie to C++. I have a background in R, and have recently taken the plunge into C++. Not having much success though. I am trying to solve an easy problem (no doubt) - reading data from a tab delimited file and inserting it into …

Member Avatar for 1bennyd
1
240
Member Avatar for mesnomer

I'm trying to display some object information and it seems to work when I use a pointer to the object, but not when I pass the pointer to a different function. Hopefully, the code will better explain: [CODE] struct pcb { int pid; string name; } void showData(pcb* PCBobject) { …

Member Avatar for ArkM
0
82
Member Avatar for Naveen_bij

I am developing a windows form application , can any one explain the basic structure of the program and how to do the basic things like calling functions for a event, opening a form on button click on main form.

Member Avatar for death_oclock
0
91
Member Avatar for Icebone1000

I have a file with record times, i need take each time and compare it whit the actual player time, so if the player time is < then the best time:input player time on top, if is >, then compare whit the next time and so... the problem is until …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for jimbob90

[code=c++] class tvShow { public: string name; string dayofweek; int lengthInMin; double rating; } [/code] write a sequence of statements that will do the following: If the show is scheduled for wednesday and the rating is above 20, print We Have a New Hit Show. if this is not true …

Member Avatar for ArkM
0
194
Member Avatar for Lukezzz

I use this code to open a FileDialog, choose a file and press OK. It works fine, but when I press OK in the fileDialog, the FileDialog doesn´t close after pressing OK the first time. The dialog blinks one time and are still open. The second time I press OK, …

Member Avatar for Lukezzz
0
124
Member Avatar for serkan sendur

i got one root folder containing my main.cpp and four folders named cmnlib(for static library), include(for headers), sourcefiles(.cpp), dbdes(mydatabase). i want to create a make file and it will first create object files from the .cpp files into sourcefiles folder and then it will create a libLibrary.a to cmnlib folder …

Member Avatar for serkan sendur
0
99
Member Avatar for Onizukas

After my searching and discussing wif my fren, to compare string i need to use strcmp but that is if i want to compare the whole sentence. What i want to do is like this: user input sentence 1: this is my house user input sentence 2: this is my …

Member Avatar for Lerner
0
77
Member Avatar for Yuichi

Hi guys, I pretty new to c++ and I have a problem with getline. I am supposed to call in a text file into a 2d character array and the text file is a maze. Here is my code: [ICODE] void maze::open() { ifstream file; int row=0; file.open("standard.txt"); while (!file.eof()) …

Member Avatar for Yuichi
0
177
Member Avatar for clutchkiller

Can someone explain what the ShellExecute function is? Ive looked around a little, but there is nothing specific that i can find. Thanks

Member Avatar for Salem
0
60
Member Avatar for _KD_

Hai everybody!I'm trying to implement a program to implement Quine McCluskey algoritm.While trying to compile with the following code,I got an error which says " no match for 'operator[]' in '((Table*)this)->Table::isMarked[r]' " . Attached are the files: Table.h,Table.cpp,Term.h,Term.cpp Please help!!!

Member Avatar for _KD_
0
130
Member Avatar for almazyoon

hi guys I want help in solving this question the power series for In(x) ( 0<x<2) for up to 1000 terms is: In(x)=(x-1)-(x-1)^2/2+(x-1)^3/3-(x-1)^4/4.......-(x-1)^1000/1000 write the C++ code of the tWo functions GetValueofvar() and GetLogofVar(var) in the following main program: void main(){ double var; double x; var=GetValueofvar(); x=GetLogofVar(var); } where get …

Member Avatar for VernonDozier
0
121
Member Avatar for Dinomike1000

I'm writing an application with Directx 9. Where I start the application in full screen mode, the image fills to fullscreen and then immediately reverts into a regular window. There aren't any problems when I run the application in windowed mode from the start. I was wondering if anyone has …

Member Avatar for Freaky_Chris
0
172
Member Avatar for Jamesinuk

Normally I hate asking for help but this is an exception. I have spent hours looking for a way to detect in Windows if the sound card or windows audio is outputting sound. I am currently working on a project which is designed to save power. My sound card is …

Member Avatar for MosaicFuneral
0
209
Member Avatar for Agni

Hi Guys, I'm trying to create my own DBMS. For now i want to create a simple one where i can 'create' tables, 'insert' data and do a 'select' for all values(no where condition as of now). Very basic features. This is the first design/pseudo code that i have come …

Member Avatar for ddanbe
0
122

The End.