49,761 Topics

Member Avatar for
Member Avatar for Alex Edwards

In C++, where are the header files that define the standard primitives and bitfields? I would like to confirm something, if it is possible. -Alex

Member Avatar for ArkM
0
184
Member Avatar for MylesDBaker

Hello, I am trying to declare a 2D array (3x3) inside of a class. I have it set up like this: GameBoard.cpp[CODE] #include "GameBoard.h" #include <iostream> using namespace std; char board [3][3]; GameBoard::GameBoard() { board [0][0] = 'a'; board [0][1] = 'b'; board [0][2] = 'c'; board [1][0] = 'd'; …

Member Avatar for ArkM
0
149
Member Avatar for CoolGamer48

Does anyone actually use the .hpp file extension for C++ header files? I've never seen it used, but I was just working with geany, and I noticed that it only syntax highlights C++ specific things if the file extension is .hpp (or .cpp, obviously, but not .h). So what's the …

Member Avatar for ArkM
0
135
Member Avatar for vahny

[code] #include<iostream.h> int main() { int row1[10]; int col2[10]; int m,n,p,q; cout<<"Enter the number of rows in matrix A"<<endl; cin>>m; cout<<"Enter the number of columns in matrix A"<<endl; cin>>n; cout<<"Enter the number of rows in matrix B"<<endl; cin>>p; cout<<"Enter the number of columns in matrix B"<<endl; cin>>q; if(n!=p) { int …

Member Avatar for cikara21
0
176
Member Avatar for Icebone1000

Hi, i was tring to figure how set display mode to fullscreen under win2000, i saw at msdn that theres a SetConsoleDisplayMode, but that is for winXP +.. I tried [CODE] //sets the console window //to fullscreen void FullScreen(){ HANDLE consolehandle; int sysmetrics_x=GetSystemMetrics(SM_CXFULLSCREEN);//get full width int sysmetrics_y=GetSystemMetrics(SM_CYFULLSCREEN);//get full height COORD …

Member Avatar for marco93
0
169
Member Avatar for NinjaLink

Hello, I'm having a simple problem. For my program, each song has an id number which stores the songs information. For my deleteSong function, I am asking the user what id of the song does he/she wants to be deleted. After the user enters the id of the song he/she …

Member Avatar for NinjaLink
0
144
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
123
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
86
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
142
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
177
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
511
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
352
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
170
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
155
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
140
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
168
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
908
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
242
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

The End.