51,593 Topics

Member Avatar for
Member Avatar for DemonGal711

I'm working on this program for a new professor and he wants us to write out what are program is going to do before we work on it. So, I've been thinking about the program and I think I'm making it more complicated. Basically, I'm going to be given permutations …

Member Avatar for DemonGal711
0
125
Member Avatar for kenji

Hi, Im having some trouble with the function and I hope some one can help. The function is supposed to go through an class array and loop for an empty spot. If it finds one its copies data to the data members. Otherwise it creates a temporary array and copies …

Member Avatar for StuXYZ
0
288
Member Avatar for Nicklorion

[QUOTE=abrou;542794]save the file as a .txt file or a .CSV (comma separated value) file. I disagree that this is the easiest though, but that's a matter of opinion.[/QUOTE] What would you do? I'm building a application that evaluates data comming out of an excel sheet. there is no other way …

0
67
Member Avatar for daviddoria

Anyone know a good, simple set of classes to do thing like cartesian to spherical conversion, coordinate system transformations, etc? I wrote some of this stuff, but my code keeps breaking because of "special cases" that I have not handled. I just want to be able to use this stuff …

Member Avatar for StuXYZ
0
202
Member Avatar for Stefano Mtangoo

I have python 2.6 portable and would pop error when I import wx. After some search, I found The prementioned package missing in the XP system. I downloaded and Installed and went fine. My Question is : Is there any way to add vcredist_x86.exe's missing DLL direct to wxpython directory …

Member Avatar for Stefano Mtangoo
0
179
Member Avatar for rock9449

[code=cplusplus] #include <iostream> using namespace std; int main () { int choice,num1,num2,answer; cout<<"This is a caculator program which will do math for you\n"; cout<<"Please Choose From one of 4 math operators\n"; cout<<"1 +\n"; cout<<"2 *\n"; cout<<"3 -\n"; cout<<"4 \\n"; cin>>choice; if (choice==1) { cout<<"please enter in two numbers to add" …

Member Avatar for shasha821110
0
95
Member Avatar for samtan

Was wondering about Null pointers , do they really point to location zero in memory and does that location got all the bits zero. Does this mean a NULL pointer points to itself? [CODE] Node<Type> *A = 0; A = Find_Node(Position-1)->R_Link; [/CODE] I have this code , where "Find_Node" function …

Member Avatar for samtan
0
117
Member Avatar for stonerain

Hello Everyone; I made a USB to RS232 converter but I need to do something else. The device is shown under device management in My Computer but I have to show "a new device found" baloon when every connection to my computer like a flash disk connected. How can I …

Member Avatar for Salem
0
103
Member Avatar for RingmasterTJ

Hey Everyone, So, I'm having an issue with a compiler error (C3861 to be exact). I'm creating a Binary Search Tree for my C++ course. The Binary Search Tree needs to overload the << operator & print the data in the tree inorder. My initial thought on solving this problem …

Member Avatar for RingmasterTJ
0
2K
Member Avatar for TasostGreat

I'm trying to write a program in C++ which writes characters into a file from 100 chars up to 120.000.000 chars in Linux. Would it be faster if I would try to use multithreading and if yes could you give me some advice some links to useful sites maybe some …

Member Avatar for Salem
0
172
Member Avatar for daviddoria

I put together this little example to test my sanity, and it failed! [code] #include <iostream> #include <fstream> #include <vector> #include <string> #include <sstream> using namespace std; /* Example.txt 23 test 4.5 */ int main(int argc, char *argv[]) { string Filename = argv[1]; cout << "Filename: " << Filename << …

Member Avatar for Freaky_Chris
0
780
Member Avatar for s-a-n-d-e

i need to input a password but it should be printed as a special character..how can i possibly do that? thanks in advance for the answer and im sorry for the disturbance..im just starting studying this kinds of stuff..again..thank you in advance..good day..

Member Avatar for Narue
0
84
Member Avatar for ghxii

I want to know how to capture the output screen of C++. It includes graphics and output uses only full screen mode. Printscreen is not working . Is there any special key combination to capture the screen and paste in word

Member Avatar for Nick Evan
0
59
Member Avatar for AdRock

I have an inheritance heirarchy and I need to use polymorphism. I have some questions because i don't really understand it fully. What i have to do is create a vector of pointers (account) to 2 of my derived class objects, SavingsAccount and CheckingAccount. Then for each account in my …

Member Avatar for AdRock
0
2K
Member Avatar for harryoma

hi, i have one question: does anybody know how to end program. i have one function in whom i calculate two numbers. i want to end program if my number is to big for example 12345 + 91111=103456 but i don't want that my has 6 digits so i want …

Member Avatar for harryoma
0
195
Member Avatar for jehe88
Member Avatar for Agni
0
440
Member Avatar for huian88

HI, Im 20f doing course on multimedia game development. Im very new to C++ and not familiar with the codes. Can someone helps assisting as my assignment due soon. I have only left this 1 task to complete.. My lecturere had covered some fstreams chapters, enum struct and string. Assignment …

Member Avatar for Murtan
0
181
Member Avatar for serkan sendur

is there any performance benefit of using constant pointer to constant variable like the following? [CODE]void doSome(const int * const param) { //do something ; }[/CODE] i know that making param constant is good for performance, how about making both constant?

Member Avatar for skatamatic
0
69
Member Avatar for yasir Malik

Dear Friends Please provide me solution code of this programme. A C++ program which contains a class named Time having three data members. • Hours • Minutes • Seconds The class must have • A default and parameterized constructor • show() method to display the time in proper format like …

Member Avatar for skatamatic
0
1K
Member Avatar for JAGgededgeOB172

Hi everyone, I'm new to this site and figured I could get some assistance here. I'm a college student with slight programming experience. Anyways... The program I need to create... needs to read a text file into an array of structures that are linked - hence a linked list. That …

Member Avatar for JAGgededgeOB172
0
119
Member Avatar for jorgeberber

hi there all , how do i loop this back to the main menu after i have used ctrl+d to give me the final total ...i looked everywhere and tried a few things but no success , my book doesnt say much either thanks . [code=cplusplus] #include <iostream> #include <cstdlib> …

Member Avatar for Murtan
0
188
Member Avatar for eedythh2

I am completly lost... I need to create a program displaying the following: Create an application with the ability to enter 5 student names. The information should be: - Student Id - Name - And final grade Print the information to the console in a tabular format with column headings …

Member Avatar for MosaicFuneral
0
103
Member Avatar for ronjustincase

hi you all.. i want to flash the output message to the screen for a limited time. can you plz help me ? is there something in iomanip, or should i do something with system("pause") and system("clear").. although the latest dont seem to me like a good solution ..

Member Avatar for death_oclock
0
159
Member Avatar for gr8 icon

hey guys.. yaar i m very new in c++.. i need some help actually not some really big help:'( .. plz send me the code for a very simple text editor,, help me.. plz plz.. i expect the answers really thick and fast.. plz plz just a very simple text …

Member Avatar for death_oclock
-2
144
Member Avatar for parse loki

I am writing a browser program in C++ Builder 6 that loads a web page using the following code: [code]void __fastcall TForm1::ToolButton1Click(TObject *Sender) { wchar_t buff[100]; MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, "http://www.daniweb.com", -1, buff, sizeof(buff)); CppWebBrowser1->Navigate(buff, 0, 0, 0, 0); }[/code] To include the address bar implementation, I need a temporary string derived …

Member Avatar for skatamatic
0
819
Member Avatar for kevinchkin

Hi Guys, I was wondering if you guys could please give me some good project ideas. Projects should be real world problems related and should be of the level of a Masters Student (latter is not that important). Please let me know if you guys have any great project ideas.

Member Avatar for skatamatic
0
108
Member Avatar for neoseeker191

I have a program that needs to be looped continuously until the user inputs an X. I am not really sure how to go about doing that. Can I make the whole program one giant while() loop? Here is the code for the program: [code] // prog1.cpp : Defines the …

Member Avatar for skatamatic
0
123
Member Avatar for FyerEgg
Member Avatar for homeryansta

I'm trying to pass a character as parameter into a function. I will then get the user's input( characters and numbers etc), the function then will return all the input characters excluding everything else. I've gotten the sorting the characters from everything else figured out, but returning the array back …

Member Avatar for homeryansta
0
143
Member Avatar for majesticmanish

Hi all, I have little problem when reading a file char by char and when i tried to make a check at the end of file. I am making a check through '\n' but its not working. Please have a look in the following Program and let me know yours …

Member Avatar for majesticmanish
0
170
Member Avatar for neoseeker191

I am doing a homework assignment in which we have to get an undetermained amount of numbers from the user. I was wondering how to tell when the user is done entering numbers and wants to exit the loop, such as perhaps a blank space or a word like 'quit'. …

Member Avatar for neoseeker191
0
245
Member Avatar for shasha821110

I have an assignment about the String Class overload function and operator. Here is the problem i face: Need an append() function to construct the String. So the String constructor is: [ICODE]String::String(char *s) { init(); append(s); }[/ICODE] [ICODE]String& String::append(char *other) { String temp; temp.m_length=strlen(other)+strlen(temp.m_buffer)+1; temp.m_buffer=new char[] m_length; if(!m_length) { strcpy(temp.m_buffer,other); …

Member Avatar for shasha821110
0
115
Member Avatar for cppnewb

I am having trouble using cin.getline and classes. Here is the code[CODE] #include <iostream> #include <cstdio> #include <cstdlib> #include <string> #include <fstream> using namespace std; class RememberPlans { public: string date; string subject; string resources; string description; }; RememberPlans nds; // Function Prototypes bool enterPlans(RememberPlans& nds); void exportData(RememberPlans& nds); void …

Member Avatar for cppnewb
0
414
Member Avatar for lakshmi mani

A University has decided to computerize its exam grading. They have a standard paper that contains 25 multiple choice questions each with four choices. All the answers by students are entered in a file. You are to read the file and calculate if the student passed or failed (60% or …

Member Avatar for Freaky_Chris
0
120
Member Avatar for tomtetlaw

Is there any macros in DarkGDK like this: [code=c++]#ifdef __DARKGDK_WINDOWS #include "MY_WINDOWS_HEADER.h" #else #include "MY_LINUX_HEADER.h" #endif[/code] any help would be appreciated, thanks in advance!

Member Avatar for Comatose
0
115
Member Avatar for d0pedup

I'm from a C background and need help with the following lines of code [CODE] struct IGame { // Summary // Entry function used to initialize a new IGame of a GameMod // Parameters // pGameFramework - a pointer to the game framework, from which a pointer of ISystem can …

Member Avatar for d0pedup
0
195
Member Avatar for 1bennyd

Hi guys, I have written some C++ code to do three things: 1. Read data from a delimited file (user specifies type of delimiter used), and return data as a "2D array". 2. Print 2D array to console. 3. Write the 2D array to a tab delimited text file. I …

Member Avatar for d0pedup
0
153
Member Avatar for a_best007

hi i am currently doing a project, and want to build in MFC...however i have just started working on it and find it really confusing... i have some doubts..please clear it as this is really very urgent(i have to complete the gui in a very short time) 1) I have …

Member Avatar for jencas
0
106
Member Avatar for kenji

Hey Guys, Im having a spot of trouble with dynamic memory allocation and any help would be appreciated. My problem is the I have 2 classes Bank and Account and I am making a dynamic array of the Account member variables. Everything seems to work fine until I try to …

Member Avatar for Salem
0
95
Member Avatar for homeryansta

[CODE]void getinput(char sentence) { cout << "enter something => " << endl; char ch; cin.get(ch); int count = 0; int i = 0; while(ch >= ' ' || count >= SIZE) { if (isalpha(ch)) { [B] [COLOR="Red"]sentence[i] = ch; [/COLOR][/B] i++; } cin.get(ch); count++; } }[/CODE] This is the function …

Member Avatar for homeryansta
0
67
Member Avatar for AdRock

I have made a base class and a derived class and I am having a couple compile errors. [QUOTE]SavingsAccount.hpp(9) : error C2512: 'Account' : no appropiate default constructor available[/QUOTE] What i want to do is be able to give the savings account an inital balance and it changes the currentBalance …

Member Avatar for AdRock
0
157
Member Avatar for LucyB

What operator would I use on a variable to increase it for addition from another variable. Thinking loops perhaps. Like the loop add's data to that variable but plus's it on, instead of changes it. So 50 + 60 = 110, instead of 50 + 60 = 60. Also, if …

Member Avatar for 1bennyd
0
147
Member Avatar for user2009

(Using MS Visual Basic 2008) Hi, I have been ask to create a program that allows the user to input the hours worked and the payrate for a number of employees (note: Hours work and the payrate can all be differ, there is no set payrate), the number of employees …

Member Avatar for user2009
0
75
Member Avatar for dvsConcept

Im getting these two errors, here is the whole code besides the edits and i know the edits works so their not important here. Error 6 error LNK2019: unresolved external symbol "int __cdecl loadArray(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const (* const)[2])" (?loadArray@@YAHQAY01$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main Q6_A1_CODE.obj Error 7 fatal …

Member Avatar for dvsConcept
0
134
Member Avatar for czardomains

C:\WINDOWS\PCHEALTH what is it and it is hogging the systems. I tried to delete but no access. Please help.

Member Avatar for czardomains
0
154
Member Avatar for mmeyer49

I'm writing a program to gain info and then print it. Problem is when a person enter $1231 for my account the $ crashes it. I would like to use cin.peek to check if it is there if it is delete it so far i have [code] cout << "Balance …

Member Avatar for mmeyer49
0
161
Member Avatar for sindorei

This is such a simple issue, it's embarrassing to have to ask.. but I've been having trouble with this theoretical issue of defining string arrays (and even integers!) outside of their class. Here's some code: [CODE]#include <iostream> #include <string> using namespace std; class desu { public: string ok[4]; // Give …

Member Avatar for sindorei
0
186
Member Avatar for RayvenHawk

Ok I have a problem here. I'm in my game engine class and for some unknown forsaken reason they decided to teach console c++ then jump to c# for windows apps, then back to c++ to do directx apps, so my skills with c++ and windows apps is well krappy. …

Member Avatar for Murtan
0
100
Member Avatar for Leopold

I'm VERY inexperienced in programming, I'm just learning the very basics. Anyways, I just figured out how to add a "pause" line to keep the program from closing as soon as I run it, but now there's a nasty "Press any key to continue" after my text. Is there a …

Member Avatar for William Hemsworth
0
10K
Member Avatar for Ronen444

Hi, First of all, i have a Resources.h file, which has the following statement: [CODE] #include <iostream> #include <string> #define string Greeting "Hi" [/CODE] So i also have Prompt.cpp; [CODE] #include <iostream> #include <string> #include "Resources.h" int main() { cout << Greeting << endl; system("pause"); } [/CODE] But, i have …

Member Avatar for Comatose
0
106

The End.