48,986 Topics

Member Avatar for
Member Avatar for Student_ABC

Hi. I'm new here and would appreciate any help you can give me. I am a college student and I'm supposed to do this assignment where I take data from one txt file and put it into another. This is step one of a larger project. I have some code …

Member Avatar for Student_ABC
0
145
Member Avatar for sidatra79

Hello everybody, I am looking for some clarifications/definitions regarding some special concepts for a better OOP design.. I already have some idea for some of them, however I would like to hear what more experienced programmer have to say. :D So lets start... [code] Could u provide a short definition …

Member Avatar for sidatra79
0
113
Member Avatar for thenic

ok i just startet coding c++ and ofc im geting alot of errors. but until now ive been able to fix them myself but when i try to debug my program it says misplaced else and i just cant find out how to get it to work. so well heres …

Member Avatar for thenic
0
98
Member Avatar for JackDurden

So if I have a header file like this: [CODE]template<typename T> class snake { public: void example(); private: T *start_Ptr; };[/CODE] and then a source file like this: [CODE]#include <iostream> #include <stddef.h> #include "foo.h" using namespace std; template<class T> struct node { T data; node *next; }; template<typename T> void …

Member Avatar for Sci@phy
0
86
Member Avatar for uae_uae99

hi everone ,actually i need ur helps. i have to submet my final project next week on 14/10 and i didnt star yet .therefore, i wanna star this week but i dont have enogh ideo 4 my topic (my topic is make program for sell and rant a car ) …

Member Avatar for VernonDozier
0
86
Member Avatar for Korg

I'm very new to C++ , and if anyone could, could they give me the code for just a simple program, that would click a link on a webpage continuasly for you :p Thanks :)

Member Avatar for chococrack
0
176
Member Avatar for skatamatic

Hi, I'm not sure I understand my teacher properly, but he wants me to use the CCTOR of class CPt in the CCTOR of class CCanvas to fill a dynamically allocated array. I'm at a loss of how to call it...maybe a little code will help this make more sense: …

Member Avatar for skatamatic
0
170
Member Avatar for Ellisande

While working on my CS project, I coded the following line: [code] if(...*stuff* || *morestuff* || *evenMOREstuff* || (strcmp(argv[5], "yes") && strcmp(argv[5], "no"){ cout << "Improper arguments." exit(1); } else{ do more stuff} [/code] Where argv[5] is a program argument supplied by the user. Either a yes or a no …

Member Avatar for Narue
0
94
Member Avatar for n8thatsme

Ok, so I have an array of objects that have 3 get functions. Get last name, get first name (both strings) and get salary. What I'm trying to do is get a user to enter First name and Last name and it search the array for the persons first and …

Member Avatar for n8thatsme
0
194
Member Avatar for skatamatic

I'm not too sure why I'm getting memory leaks...hopefully someone here is wiser than me, and can help me find it :P . [code=cplusplus] #include "Canvas.h" CDrawer CCanvas::gCanvas(RGB(0,0,0), 1); int const GREEN(20000),BLUE(50), RED(200), THICK(3); CCanvas::CCanvas(void): _iSize(0), _cptPoints(0) { } CCanvas::CCanvas(CCanvas const & tmpCanvas): _iSize(tmpCanvas._iSize) { if (_iSize > 0) { …

Member Avatar for ivailosp
0
218
Member Avatar for hapiscrap

[code=cplusplus] #include <iostream> #include <fstream> using namespace std; int main() { int numberofemployees; int employeeid, hoursworked; float hourlyrate, grosspay, taxamount, netpay; const float TAXRATE=0.10; ifstream fin("C:\Dev-CPP\employee.txt"); while (!fin.eof() )} fin >> employeeid >> hoursworked >> hourlyrate; cout<<"EMPLOYEE ID IS: "<<employeeid<<endl; cout<<"THE HOURS WORKED ARE: "<<hoursworked<<endl; cout<<"THE HOURLY RATE IS: "<<hourlyrate<<endl; …

Member Avatar for Sky Diploma
0
214
Member Avatar for chanda gul

Hi, I am trying to list all the files in a drive. when i use "*" instead of "C:\*" in findfirstfile() function then it works fine and lists all the files in the current directory but it does not work when i use "C:\*" and does not list files. can …

Member Avatar for chanda gul
0
145
Member Avatar for sleepytoast

first time here so I'm sorry if I didn't do something correctly. I need to find the total number of floors, rooms on each floor, how many empty rooms there are, occupied rooms on each floor, find occupancy rate, and the "Heartbreak Floor". Which has to display the floor with …

Member Avatar for sleepytoast
0
101
Member Avatar for TheBeast32

Hi, I'm taking a programming class at my school. My teacher gave us a pdf that said "..You will be writing a program that can read a bitmap and insert a secret message into the bytes of the picture in a retrievable way using the picture as a cipher and …

Member Avatar for TheBeast32
0
123
Member Avatar for mrrko

Hi guys! Well they gave me this work, that says as follows: Write a program to score the paper-rock-scissor game. Each of two users types either P, R, or S. The prgram then announces the winner as well as the basis for determining the winner: Paper covers rock, Rock break …

Member Avatar for mrrko
0
2K
Member Avatar for kudusan

i have a problem creating games with C++, if anyone has a source code in C++, please share with me, i need help, simple game is okay e.g: snake, arkanoid i just need a source code for a simple game, without open GL or something like that (because i can't …

Member Avatar for Salem
0
297
Member Avatar for siddhant3s

Hi, and here i am throwing a "not the exact version" of my problem, but if this is been solved, my problem is done. Lets suppose i am building a application in c++ that will simply display the content of a text file. I absolutely can make the app take …

Member Avatar for siddhant3s
0
112
Member Avatar for Traicey

Can anyon help me with the code to delete from file using the delete method or function void delete() { } Thanks in advance

Member Avatar for unbeatable0
0
102
Member Avatar for sunveer

How can i print the lower and upper triangles of matrix Please guide me in writing the code. i don't know even how to start writing the code. Please help.

Member Avatar for n1337
0
117
Member Avatar for nehansh

I would like to work with the MFC classes. As far as I Know these are not included with the Visual C++ express edition but only with the standard edition . can i get these classes for free elsewhere or do I have anyother option? please help.

Member Avatar for jencas
0
90
Member Avatar for stockton

I have some C code that, when compiled under Linux, works perfectly as a CGI. This same source compiles perfectly with Visual C++ producing an exe. My question is how do I use this as a CGI in a Windows, Apache environment. Can I just place the exe in the …

Member Avatar for stockton
0
115
Member Avatar for kux

ok, long story make it short I have a quite large project, a makefile and gnu make. All runs fine. Trying to port the project to windows, and building with mingw32-make I come accross some problems... One of it is that i can't use sed for automatic dependeny generation as …

0
87
Member Avatar for jeevsmyd

Hiii I just made a small [B]Memory game[/B] with the help of many of the members of [I]daniweb[/I].... Now I have a screen clearing problem... The program is simple...The compiler shows random numbers,then the user inputs the number within a time limit... there is a scoring key.... but I want …

Member Avatar for Ancient Dragon
0
122
Member Avatar for AutoC

Hi, Thanks to everyone I was able to submit my huffman coding assignment successfully.Now I've got to do arithmetic coding and it seems really confusing.I've looked at arturo campos's page [URL="http://www.arturocampos.com/ac_arithmetic.html"]http://www.arturocampos.com/ac_arithmetic.html[/URL] and havent understood using the range 0000h to ffffh instead of [0,1) and adjusting probabilities to be limited to …

Member Avatar for Ancient Dragon
0
66
Member Avatar for Geard2

I was wondering if anyone happens to know any good c++ books to learn linked list (single, double, and/or circular)? Something that has explains with code to show how to do it and explanations to the code if possible.

Member Avatar for Sky Diploma
0
87
Member Avatar for Kamal_Java

HI, I am new to C++ and i need help on this topic . Overloading streams . I feel this very difficult to learn after i have learnt java. I have a Base class Called BX [CODE]class BX { public: BX( ); BX( string X, string Y ); // 2 …

0
76
Member Avatar for justinlake888

I am working on a code and I want it to ask if I want it to enter another number... when I hit "y OR Y" it repeats but the code. I don't know how to make it output "bye" when I type "N or n". Can someone please help …

Member Avatar for stilllearning
0
111
Member Avatar for launic

I'm trying to go through a directory and put all of the files into a vector of strings. My problem is that the name of the file is stored, but not its location. Because of this, when I go to open the file later in another function, it doesn't recognize …

Member Avatar for stilllearning
0
94
Member Avatar for StainlessSteelR

I am having a hard time with my homework and I was wondering if someone could help. I have to create a program that uses a while loop to ask questions about a hotel. It first ask the number of the top floor then asks How many rooms are on …

Member Avatar for VernonDozier
0
189
Member Avatar for Ellisande

How do I write it so if I have ifstream file("file.txt") that has rows of characters like 60 REGULAR NONE GREEN BEGIN REGULAR NONE REGULAR NONE GREEN END that I can read one line at a time and do whatever I need with it.

Member Avatar for VernonDozier
0
90

The End.