49,756 Topics

Member Avatar for
Member Avatar for Gamergirl22

Hi, I have a program problem with converting decimals to binary and back again. My teacher said that the program is to be like a menu and convert decimals or binary from the user's input. This is part of my code: [code=cplusplus] #include <iostream> #include <string> using namespace std; void …

Member Avatar for Gamergirl22
0
172
Member Avatar for maxicube

how would I get the install directory of another program, the registry perhaps? (using HLDS as my directory to be found) [URL="http://storefront.steampowered.com/download/hldsupdatetool.exe"](GET HLDS HERE!)[/URL] i fond the key which might be useful. (how would i open it? [CODE][HKEY_CURRENT_USER\Software\Valve\HLServer] "InstallPath"="C:\\hlds" "Full Name"="Half-Life Dedicated Server" "Region"="5" [/CODE]

Member Avatar for maxicube
0
121
Member Avatar for dapcigar

I've been trying to convert my Modular programming code from array to link list.. the whole program is kinda messy now.. could anyone help me figure out what problem am having with the code? PS: am using Vc++6 to compile... Thanks in Advance

Member Avatar for minas1
0
85
Member Avatar for kyosuke0

whenever the clearMemory function is called i get a segmentation fault and i can not figure out whats wrong. The function is supposed to delete all pointers. The function brings in the pointer to the linked list by reference. The nodes in the list are structs i named bus that …

Member Avatar for rajenpandit
0
134
Member Avatar for alexdm50

hi im new to daniweb im currently working on a piece of work. the idea is to create a bank account with deposit and withdrawal functions. create student business and current accounts (this is all roughly done and a case of copying and pasting for each account type with a …

Member Avatar for Lerner
0
133
Member Avatar for TheBeast32

Hi, I was told that you can crash Windows in C++ or C by "corrupting the kernel", and I wanted to know if this was actually possible. If anyone knows if this is possible, or how it happens, please tell me. ;)

Member Avatar for William Hemsworth
0
176
Member Avatar for jbrock31

Hello everyone. I need help using an instance of a class in another. Below are two header files. NumDays.h and TimeOff.h I need to have instances of the NumDays class in the TimeOff class as members. When i try to create the instance called maxSickDays, i do not get access …

Member Avatar for jbrock31
0
554
Member Avatar for maxicube

OK, I'm making a backup application and once the backup is complete, I want it to flash FINISHED!!!! - in different colours - any help at all would be appreciated, thanks - MaxICube

Member Avatar for maxicube
0
152
Member Avatar for number87

I am creating a linked list which links a struct of data together. However, this is my problem, if I declare struct Node first then the Event type wont exist, but if I declare struct Event first then nodePtr wont exist....im kinda stuck here as to how I should declare …

Member Avatar for number87
0
461
Member Avatar for SoprtsFilmer

I am having a problem with a program. I have to create a program with about 8 different functions. Which reads in votes, finds the max, the min, prints the votes, prints the max prints the mid, finds the normalization, outputs how many are below .25 and above .75 and …

Member Avatar for vmanes
0
332
Member Avatar for mstrofdrgns

hey there , Im taking C++ courses in my collage (so ım a newbie) and they are teaching programing language a bit different from the examples in this forum. [code=c] #include <stdio.h> int main (void) { int x; int y; int z; int min; printf("enter 3 numbers : "); scanf("%d …

Member Avatar for Ancient Dragon
0
138
Member Avatar for Lokolo

[code] void writingTransactionToFile(string transaction) { string temp; int test; ifstream myfile("transactionlog.txt"); ofstream tempfile ("tempfile.txt", ios::app); if (tempfile.is_open()) { tempfile << transaction; if(myfile.is_open()) { while(!myfile.eof()) { getline(myfile,temp); cout << temp; tempfile << temp << endl; } } else { cout << "Unable to open file."; } tempfile.close(); myfile.close(); } else cout …

Member Avatar for brechtjah
0
168
Member Avatar for MJFiggs

I have had this problem a couple of times but i am unsure of what it means. could someone tell me what the error message "non-lvalue in assignment" translates to in english, please?

Member Avatar for MJFiggs
0
154
Member Avatar for rhoit

I decided to learn the template any how.... but... Each level is giving me the trauma staring up with the domino one after another.. please help.... Problem is I use both printf(); and cout<< for the console output... now the problem lies that i can't just leave one of them.. …

Member Avatar for StuXYZ
0
102
Member Avatar for mshefa

[code=cplusplus] #include <iostream> using namespace std; int CelsiustoFahrenheit() { float celsius; cin >> celsius; float fahrenheittemp; fahrenheittemp = celsius * 1.8 +32; }; int FahrenheittoCelsius() { float celsiustemp; float fahrenheittemp; cin >> fahrenheittemp; celsiustemp = (fahrenheittemp-32)/1.8 ; }; int main() { int choice; float celsiustemp,fahrenheittemp; cout << "1.Celsius to Fahrenheit" …

Member Avatar for mshefa
0
2K
Member Avatar for CMacDady

I have been writing a Loan Program that requires at one point to read a .txt file and create an array from the contents. This part is nothing new to me. The problem I have is a single line of code and I cant figure out how to make it …

Member Avatar for CMacDady
0
135
Member Avatar for Stefano Mtangoo

Hello Developers! I have been searching for long lame binding for python and have no way but need to learn ctypes to use lame_enc.DLL. For Now I need simple DLL with simple functions to play with. My Question is: Where can I get that simple yet safe DLL to play …

Member Avatar for Stefano Mtangoo
0
152
Member Avatar for egolovin

Hi all i am working on a memory game and i am having problems inputing the data so it checks if a 3rd number is pulled up to ignore it thanks in advance [CODE]int card[6][6],total=0,value,test; srand((unsigned)time(NULL));//randomize timer for (int i=0;i<6;i++) { for (int j=0;j<6;j++) { value=rand()%18;//random test=0; card[i][j]=value;//sets the value …

Member Avatar for egolovin
0
281
Member Avatar for davids2004

Write a program that calculates how much a person earns in a month if the salary is one penny the first day and doubles each day worked. [B]The program should ask the user for the number of days worked during the month[/B] and should display a table showing how much …

Member Avatar for VernonDozier
0
147
Member Avatar for brechtjah

I have absolutely no clue why the following code works except for the following three characters: ç, à and è. It should rule out all non-digit characters from being written into an edit control. Because it let's those three pass trough I am forced to turn this: [code=cpp] if(!isdigit(editControl_Content[2])) [/code] …

Member Avatar for brechtjah
0
167
Member Avatar for tpluscomb

I have been writing some quicksort code and testing it on integers and all seems to be going well. Now I'm trying to use my code to read in words from a file and quicksort them. I tried using my quicksort on an array of strings but that did not …

Member Avatar for ArkM
0
905
Member Avatar for price

Hello, I'm programming in C++. Is it possible to have a private data member of type class X within the definition of class X? For example, [code] class X { ... private: X m_member; ... } [/code] I'm pretty sure it's not possible, but I appreciate any feedback. -price

Member Avatar for Narue
0
45
Member Avatar for laki234

i have created my code.But my division is not working for longer number.CAn anybody solve this. [ICODE] #include <iostream.h> #include <string.h> #include <stdlib.h> #include <sstream> #include <iomanip> using std::setfill; using std::setw; using namespace std; void subtract (struct head *oprnd1, struct head *oprnd2, struct head *result); void add (struct head *oprnd1, …

Member Avatar for William Hemsworth
0
234
Member Avatar for laki234

hi i want to create huffman binary code which tales string as a input,identify Identify the set of characters appearing in the input string. Count the frequencies of these characters. According to these frequencies, generate a Huffman binary code .I have to do this in c++ using cursor.I dont knw …

Member Avatar for MosaicFuneral
0
232
Member Avatar for Quendy

Here is my code, I want to get the coordinate of the mouse position: [code=cplusplus] #include <iostream> #include <string> //#include "WinDef.h" //#include "stdafx.h" #include <windowsx.h> #include <windows.h> #include <atltypes.h> using namespace std; int main() { DWORD pos = GetMessagePos(); CPoint pt(LOWORD(pos), HIWORD(pos)); ScreenToClient(&pt); return 0; } [/code] But I could …

Member Avatar for vmanes
0
541
Member Avatar for alias120

Hi there, new to the community and first of all just wanted to say its great to be here. I'm rather new to C++ and i was having an issue perhaps someone could clear up for me. Alright, our instructor for a class im taking would give us simple programs …

Member Avatar for davids2004
0
156
Member Avatar for nvodapally

Implement a recursive template function for the 2-way Mergesort algorithm. A Main program is provided that tests this function. Can anybody help me out with this question? this is the main function [code=cplusplus] #include <iostream> #include "Student.hpp" #include "MergeSort.cpp" int main() { const int n=10; { Student A[n]; Student tmpArray[n]; …

Member Avatar for skatamatic
0
76
Member Avatar for starletcharmed

Hey! We have to write a function that deletes nodes from a linked list. I was wondering if you could tell me if this is correct, and if not, how I could fix it? [CODE]void delNeg(node * L) { node *cur = L; node *prev = NULL; while(cur != NULL) …

Member Avatar for cikara21
0
99
Member Avatar for scamguru

[B]I have to read a file (for a string) and the file is available only at the compilation time, not in the run time. Is there any possibility to read the file during compilation and initialize a variable with the value read from the file. I have tried different methods, …

Member Avatar for vmanes
0
105
Member Avatar for NewGuyCPP

I'm new to c++ like most people here, but i'm trying to learn to do C++ if one of my courses and its not going well (been given 6 powerpoints to go by). Ok so to the questions: Using Dev-C++ for programming and whenver i put in a number wrong …

Member Avatar for cikara21
0
114

The End.