51,593 Topics

Member Avatar for
Member Avatar for tgreiner

OK, here is a problem that I have found described many times on the net, but have not found a definitive solution. Until recently, file writing has worked just fine for me, but no longer. The questions are: Why does it not work now? What might I have done somewhere …

Member Avatar for tinstaafl
0
9K
Member Avatar for MrXortex

Hi I coded a program where you can reverse the contents of an array. But I used two arrays to complete this process, I want to make it work by using only one array. Here is my code so far, it works btw, just need to make it work by …

Member Avatar for tinstaafl
0
468
Member Avatar for it@61@sec

I have a program which reads entries from a directory. These entries are stored in a vector called fdata. Using vectors gives me an easy way to sort the entries. The program copies files from one directory (the source directory) onto another directory (the destination directory). While the copying is …

Member Avatar for it@61@sec
0
220
Member Avatar for ilovec++

I have some doubts concerning some basic C++ concepts, and would be very thankful, if someone would kindly clear the doubts: a) Every variable of a data type occupies a specific amount of memory, like int occupies 2 bytes and so on. So, if I declare a reference variable as, …

Member Avatar for yoavip
0
566
Member Avatar for Thomas_25

Hi all, What is the best sorting algorithm for a doubly linked list? Insertion sort and merge sort appears to the best due to the less overhead compared to the bubble/selection sort. Would like to know your insights on this. Thanks.

Member Avatar for rubberman
0
2K
Member Avatar for Abetsub71
Member Avatar for adnan_6

Dear programmers, I have downloaded the program from here http://www.tightvnc.com/download/2.7.10/tightvnc-2.7.10-src.zip and want to compile with the vs2013 ultimate edition and get the following error. Thanks

Member Avatar for adnan_6
0
345
Member Avatar for Bendez Thyna

#include <iostream> #include <fstream> #include <stdlib.h> #include <iomanip> #include <string> using namespace std; const int MAX_SIZE = 60; void discard_line(ifstream &in); void print_student_records(structarray[], double scmarks[], double sfmarks[], int size) ; int main() { string id[MAX_SIZE]; double cmarks[MAX_SIZE]; double fmarks[MAX_SIZE]; //char grade[MAX_SIZE]; int choice; char response; int total_records; ifstream infile; cout …

Member Avatar for Bendez Thyna
0
324
Member Avatar for tgreiner

In the course of my programming I have created a new class called Vector (yes I know that vector.h exists, but I like my version better, or at least I have until now). As part of my class, I have overloaded the = to use as an assingment function, as …

Member Avatar for tgreiner
0
299
Member Avatar for rimsha240893

I DUN UNDERSTAND WHAT TO DO. PLZ HELP ME. WE HAVE TO DO IT WITH SIMPLE C++ PROGRAMMING. THANKS Egyptian Pyramids were constructed around 2500­3000 BC, by using large Cubic blocks placed in a perfect mathematical way. Researchers are still struggling to find out how these pyramids were constructed without …

Member Avatar for rubberman
-1
167
Member Avatar for StoneHeart

Im trying to animate a sprite just like how that [MUGEN](http://en.wikipedia.org/wiki/M.U.G.E.N) game engine does. Ive been searching the net for an example/documentation but none of it works like on that game engine. All game engine or example on the net uses fixed delay on each sprite ie. 5 ticks but …

Member Avatar for rubberman
0
148
Member Avatar for Mica_1

string guessNo; **Hi! How do I validate the user input in C++ ? I just want the guessNo string to have** 4 characters, all of which are numbers**.**

Member Avatar for rubberman
0
106
Member Avatar for Pokenerd**

I'm having difficulties with this code...it won't randomize the answer for some reason #include <string> #include <iostream> #include <cstdlib> #include <iomanip> #include <fstream> #include <ctime> #define down8 "\n\n\n\n\n\n\n\n" #define down7 "\n\n\n\n\n\n\n" #define down5 "\n\n\n\n\n" #define over4 "\t\t\t\t" #define over3 "\t\t\t" #define over2 "\t\t" void welcome (); void splash (); using …

Member Avatar for Moschops
0
287
Member Avatar for HōñËy

I need the solution of this program using C++ .. Develop a database software to maintain the records of students of a college.The software should be user-friendly.The user can easiy add new records,update existing records,create reports of existing records etc.

Member Avatar for David W
0
283
Member Avatar for SUBHENDU_1

Write a program to print the following pattern based on user input. For eg: If N=4 the code should print the following pattern. 1*2*3*4*17*18*19*20 --5*6*7*14*15*16 ----8*9*12*13 ------10*11 Again if N=5 the code should print 1*2*3*4*5*26*27*28*29*30 --6*7*8*9*22*23*24*25 ----10*11*12*19*20*21 ------13*14*17*18 --------15*16 For N=2 the pattern will be 1*2*5*6 --3*4 PLEASE HELP AS …

Member Avatar for David W
0
179
Member Avatar for Ghost

Hi Everone, How do I remotely access my computer - I want to be able to control the mouse and keyboard and view the screen in real time. I wanted to do this in Java, but the experts sent me here because Java is not platform dependent and C++ is. …

Member Avatar for adnan_6
0
2K
Member Avatar for ArpitJ.25
Member Avatar for ArpitJ.25

What does int flag = 1 or flag = 0 means in C++ language? I have seen it in many programs but I don't know its use.

Member Avatar for Schol-R-LEA
0
170
Member Avatar for alzooz

hi , i need help to complete wrting a program // #include<iostream> #include<cmath> using namespace std; int main() { //decaler data here double var, n=0, sum = 0; double x, xi; //input cout << "please enter the value of x :"; cin >> x; cout << "please enter the value …

Member Avatar for ddanbe
0
128
Member Avatar for Thomas_25

I have a base class (A) and two derived classes (B,C) (mode of inheritance is public). I have two values in base class A that needs to be modified by derived classes B,C so i declared their get() and set() under protected in base class. Now each of the derived …

Member Avatar for Thomas_25
0
336
Member Avatar for Dankwah Emma

**Guessing game. Write a c++ game that asks the user to guess a number between 1 and a 100. If you guessed correctly, it will say you win. If your too high or too low it will also let you know.**

Member Avatar for Rik30
0
126
Member Avatar for sunshine102030

please can you help to get this answer : ![Capture.PNG](/attachments/large/4/6f316954e2e1f132d107b4029205fd2d.PNG "align-center") I have a problem in the result of kilometer formula #include<iostream> #include<fstream> #include<iomanip> #include<string> using namespace std; int main() { ifstream infile; ofstream outfile; string outfilename; string filename; string Kilo; string dayfees; double f1, f2, f3, Kilometers, cost_km, …

Member Avatar for David W
-1
202
Member Avatar for Syed Ammar

I have another question and trying to solve but did not solve this anyone who help me to solve this the Question start here...... Write a program that reads a whole paragraph (you can do that with a little common sense) from the user. Now prompt the user enters a …

Member Avatar for David W
0
150
Member Avatar for VengefulToast

Hi, I am trying to construct a binary tree using a list. class Element { private: list<Element*> _children; char* _name; //...other data members and methods } I have a class ("Element") that has children ("_children"), but I cannot figure out how to add children to the elements of "_children". I …

Member Avatar for David W
0
183
Member Avatar for Rebeka

Please calculate water bill for Mr Adnan using your program,if last month he used 18 liters of water.Tariff for every liters used in RM0.24.Tariff of RM0.12 will charge for every liters used after the water usage exceeds 12 liters.The programwill be repeated until the user enter ‘0’ liter for the …

Member Avatar for David W
0
141
Member Avatar for AQ

hey guyss..!! I'm having some difficulties working with strings (cstyle, object oriented strings). as this is something new for me so I'm not exactly familiar with functions of strings aswell.. write now i have a question for which i was making a solution but the code is missing something please …

Member Avatar for David W
0
323
Member Avatar for mimi_1

#include<iostream> #include<string> using namespace std; int counterofanalog=0; int counterofdigital=0; int counterofsmartwatch=0; int num=0; //class for Genwatch class genWatch { private: int watch_id; string brand; int price; string colour; int date; public: genWatch() { watch_id=0; brand=""; price=0; } void adddata() { cout<<"Please Enter Watch ID:"; cin>>watch_id; cin.ignore(); cout<<"Please Enter Watch Brand:"<<endl; …

Member Avatar for phoenix254
0
247
Member Avatar for Thomas_25

Hi, I'm trying to learn templates. I want to pass strings and integers via objects. I made it as a template because my program should support both strings and integers. // Main Function int main() { string element; library <string> comics; cout << "\nPlease type in the element: \n"; cin …

Member Avatar for Thomas_25
0
156
Member Avatar for dolly55

i have a problem with my dev c++ whenever i write a source code firstly it shows output then i made amendments in it after that it is not showing me any output. . . can anyone tell me what is the actual problem???

Member Avatar for rubberman
0
6K
Member Avatar for James19142

I continuously get this warning whenever a constructor delegates to another constructor within the containing type, having virtual bases. `warning C4100: '$initVBases' : unreferenced formal parameter` It's the same warning as when a parameter or local goes unused, it in this case it seems to be referring to the virtual …

Member Avatar for James19142
0
650
Member Avatar for Ma Nicole Ydralyn

Hi guys I need some help in sorting array in descending and ascending order. I already have my ascending program but it does not work when I put codes for descending..

Member Avatar for vegaseat
0
132
Member Avatar for Ma Nicole Ydralyn

Hey guys I'm having trouble on placing my loops I actually want to make a square and I dont know how to manipulate my own placement because I am used to gotoxy(); and I think it only works in TurboC++... As of now I am using DevC++ .. Can you …

Member Avatar for vegaseat
0
165
Member Avatar for Syed Ammar

I not know about 2d array Please help me to solve this problem......................... Write a program that declares a 2-D array of 7 rows and 2 columns. The rows represent one day of the week. The first column is the maximum temperature of that day and the second columns is …

Member Avatar for David W
0
247
Member Avatar for heyhey123

Hi Im stuck doing these in 2d arrays also I dont really get whats its asking for. If someone could help me out I would appreciate it a lot. Find the average for July over 4 years= 87.5 Find the average for the first 6 months in the first year= …

Member Avatar for David W
-1
146
Member Avatar for OnceUponaDime

A recent assignment requires me to create a pseudocode for a game of tic tac toe. And I'm a bit lost. Here's the details: ++++++++++++++++++++++++++++++++++++++ Design a program that allows two players to play a game of tic-tac-toe. Use a two-dimensional String array with three rows and three columns as …

Member Avatar for rubberman
0
1K
Member Avatar for sunshine102030

please , can you help to find the formulas accourding to the results in the pictures ? ![111.PNG](/attachments/large/4/db77c2b3808787166a0324578c0b38ba.PNG "align-center") The first formula is based on number of kilometers you plan to go. The expense for this formula is computed as follows: - For the first 500 kms, the cost of …

Member Avatar for rubberman
-1
122
Member Avatar for Rohith_1

Hello, I am currently doing my 8th sem project,my project is tracking of surgical instrument in hospital. what i am doing is i will be storing all the details of instrument which are used in operation, in local database. So after operation i will be sending all the instrument name …

0
111
Member Avatar for Ma Nicole Ydralyn

Can I ask on how to use the goto statement because here in my program I am using Function and inorder to go back from the top I use goto statement.. Why isn't it working?? #include<iostream> using namespace std; void rankE(){ cout<<"Rank: E "<<endl<<endl; } void rankD(){ cout<<"Rank: D "<<endl<<endl; …

Member Avatar for deceptikon
0
393
Member Avatar for Misgana_2
Member Avatar for necrovore

Hi, I am trying to explore PoDoFo for parsing PDF files. So I tried to build it on Visual studio following the procedure in the ReadMe.html that came with the package. So i used the following cmake command: cmake -G "Visual Studio 9 2008" -DCMAKE_INCLUDE_PATH="D:\PoDoFo_VS\CmakeRefer\ft245\freetype-2.4.5\include;D:\PoDoFo_VS\CmakeRefer\libjpeg\build\include;D:\PoDoFo_VS\CmakeRefer\libjpeg\build;D:\PoDoFo_VS\CmakeRefer\zlib\build\include" -DCMAKE_LIBRARY_PATH="D:\PoDoFo_VS\CmakeRefer\ft245\freetype-2.4.5\objs\win32\vc2013;D:\PoDoFo_VS\CmakeRefer\libjpeg\build\lib;D:\PoDoFo_VS\CmakeRefer\libjpeg\build;D:\PoDoFo_VS\CmakeRefer\zlib\build\lib" -DPODOFO_BUILD_SHARED:BOOL=FALSE -DFREETYPE_LIBRARY_NAMES_DEBUG=freetype245MT_D -DFREETYPE_LIBRARY_NAMES_RELEASE=freetype245MT .. …

Member Avatar for necrovore
0
2K
Member Avatar for Gustavo_2

So I have to build a program that shows the outcome of an imaginary battle between two groups of animals. I'm having an issue with making the user select the type of the animal. I have all my data e numerated, but I can't seem to get cin>>type to work. …

Member Avatar for ddanbe
0
89
Member Avatar for yoavip

Hi, I have a C++ code running OpenGL GUI (CEGUI), I need to wrap this window inside a C# Application. I guess I will compile the C++ as a dll, and add entry points for the C# app. What is the preffered way to do this? I thought of these …

0
165
Member Avatar for Erica_2

I have been hitting a brick wall with this program. I am new at c++ and the text only shows really really easy examples. the deposit function works fine, but i am running into problems with the checking function and doing the final output. 1. when i type in 'C …

Member Avatar for Erica_2
0
930
Member Avatar for cambalinho

my Region bitmap way uses the CreateRectRgn() and CombineRgn() functions. my question is: is more faster use the CreatePolygonRgn() with POINT array object?

0
61
Member Avatar for cambalinho
Member Avatar for cambalinho
0
112
Member Avatar for preslav_milev

Hello ! I have a task that is difficult for me to handle. The task is: Create recursive function that can be generate a string of length N (N <= 100), formed by the letters 'A', 'B' and 'C' and does not containing two identical adjacent substring. For example: enter …

Member Avatar for preslav_milev
0
632
Member Avatar for nitin1

#include<iostream> using namespace std; int add(int x,int y) { int ans=0; int carry=0; for(int i=0;i<=31;i++) { int p = (1<<i)&x; int q = (1<<i)&y; int r = p ^ q; r = r^(carry<<i); ans = r | ans; if(p&q || p&(carry<<i) || q&(carry<<i)) carry = 1; else carry =0; } …

Member Avatar for rubberman
0
165
Member Avatar for Ma Nicole Ydralyn

Hi I just wanna know what is wrong in my program I'm a little bit confused using FUNCTION... Thank you... #include<iostream> #include<cstring> using namespace std; struct Name{ char* names; int grades; }; int main(){ int a, Jo; Name John; Name Alvin; John.names; John.grades; Alvin.names; Alvin.grades; std::cout<<"Student Name: "; cin>>John.names; cout<<endl; …

Member Avatar for Ma Nicole Ydralyn
0
161
Member Avatar for Njay19

Not sure how to put my code in to excel. 1.#include <iostream> 2.using namespace std; 3. 4.int main() 5.{ 6. const int n = 20; 7. int Array[n] = { 3, 5, 2, 9, 6, 12, 16, 11, 18, 4, 14, 8, 1, 15, 17, 7, 19, 13, 20, 10 …

Member Avatar for Njay19
0
317
Member Avatar for chevy_1

> So basically I just started learning to use Windows forms with c++. I am creating an inventory/point of sale system. I have done the inventory part but now I want to do the sales part but I'm not sure how to go about it. I want to create a …

Member Avatar for mlesniak
0
296

The End.