49,761 Topics

Member Avatar for
Member Avatar for chunalt787

This is for a frequency table that will eventually allow me to build a Huffman coding tree. I want the class FrequencyTable to simply hold a vector of the type FrequencyNode however I keep getting an error about ISO forbiding the creation of the vector. Any ideas why? Error: [CODE]FrequencyTable.h:11: …

Member Avatar for chunalt787
0
118
Member Avatar for clutchkiller

What would be the difference between something like int func1 = "This is my function" and string func = "This is my function" (sorry if syntax is off) The only thing ive been able to find in research, is that c++ offers a specific header to handle string i/o etc... …

Member Avatar for clutchkiller
0
123
Member Avatar for evilsithgirl

hello everybody. I am trying to write a game of rock paper scissors where the user plays against the computer. The computer picks a random number and the user makes his/her own selection. then the selections are compaired and the winner is selected. I need to write the following in …

Member Avatar for ddanbe
0
2K
Member Avatar for inumbris

I'm working with existing code, where I've found that I have to modify some #include preprocessor directives. For example, to change [code]#include "myhdr.h" [/code] to [code] #include "..\hfiles\myhdr.h"[/code] I include the original line in a comment just above the changed line: [code] /* #include "myhdr.h" original */ #include "..\hfiles\myhdr.h" [/code] …

Member Avatar for ArkM
0
226
Member Avatar for brechtjah

I want to simply put an image as background of my parent window. Is it possible to put this into the class? [code]wc.hbrBackground = image[/code] I've been looking all over Google, maybe I'm using the wrong keywords but I'm not finding anything. Anyway, on top of that image, would it …

Member Avatar for William Hemsworth
0
120
Member Avatar for darren2005

I'm very new at C++ and would like to know how I would change a directory via user input? This will be a Win32 Project and [U]not [/U]a Win32 application. I know I can use (as standard - and without user input) the [U][B]chdir("\\dir");[/B][/U] - but how do I use …

Member Avatar for darren2005
0
2K
Member Avatar for mrboolf

Hi all there. I was given the task to write a simple Complex Number class as an exercise for a class I'm taking. I already met my professor and all went well (:)) but I'm left with a question which I forgot to ask her: how should I handle any …

Member Avatar for mrboolf
0
118
Member Avatar for localp

[icode] struct entry { int key; } entry[TABLE_SIZE]; [/icode] i declared a struc like this... but i no that u cant declare it in this way, if i write it in the correct way i am getting errors. Y is this, can some one modify this code please .. i …

Member Avatar for vmanes
0
166
Member Avatar for atnshun

My code is the following: [code] # include <stdio.h> # include <sys/types.h> # include <sys/ipc.h> # include <sys/sem.h> # include <unistd.h> # include <stdlib.h> # include <time.h> # define NS 3 union semun { int val; struct semid_ds *buf; ushort *array; }; int main(void) { int sem_id, sem_value, i; key_t …

Member Avatar for atnshun
0
209
Member Avatar for localp

[icode] struct value { char c[29]; }; char toLower(char na) { char c; char str[29]; int i=0; while (na[i]) { c=word[i]; str= (char)(tolower(c)); i++; } return (str); } [B][U][COLOR="Red"]in the main program[/COLOR][/U][/B] cout<<"Enter The your name: "<<endl; cin>>v.c; toLower(v.c); [/icode] This is what i wrote to convert the insert text …

Member Avatar for ArkM
0
127
Member Avatar for Liszt

Why does I encounter a compileerror when doing this. Compile error says. 'Form3' : undeclared identifier 'Form4' : undeclared identifier Inside of Form4.h: [code] #include "Form3.h" Form3 ^form3 = gcnew Form3; form3->ShowDialog(); [/code] Inside of Form3.h: [code] #include "Form4.h" Form4 ^form4 = gcnew Form4; form4->ShowDialog(); [/code]

Member Avatar for Liszt
0
116
Member Avatar for gil_mo

Hi, I've been experiencing problems when attempting to add resources to a DLL using UpdateResource. I'm adding many images to the DLL, and as soon as the overall image size reaches ~16MB, the DLL loses other resources that previously existed. Any ideas? Thanks, Gil Moses.

Member Avatar for gil_mo
0
135
Member Avatar for RohitSahni

001 00002 0000003 00004 000005 6 000007 008009 ------------------------------------------------------------------------------------------------------ GBL UTG.L 0692861 DCGB 000000 0 205750 826UTG GBL UU.L 0646233 DCGB 000000 0 722501 -371UU. I have the above data line by line each and coloumn has fixed width then in those i want to assign 9 coloumns to variables …

Member Avatar for ArkM
0
368
Member Avatar for amit vaya
Member Avatar for Ancient Dragon
0
23
Member Avatar for flexy82rpq

i've wrote a program with a header file and a cpp file. when i try to compile i am getting errors that i can't fix, (i'm just a beginner). Code Below: [B][U]the .H file[/U][/B] [code=cplusplus] //Flexie Muirhead #: 26075046 //Assignment #2 #include <iostream>//allows program to output data to the screen …

Member Avatar for kux
0
119
Member Avatar for faisaly

Considering the given code as an algorithm calculate the time complexity of this code. #include<iostream> #include<stdlib.h> using namespace std; int main(){ int i, j, n; for(i=0;i<n; i++){ for(j=0; j<n; j++){ cout<<"my time complexity is = "<<i*j<<endl; } cout<<"complexity is increasing"<<j<<endl; } system("pause"); return 0; }

Member Avatar for Freaky_Chris
0
134
Member Avatar for asifjavaid

Hi, I working on COM Components in VC++.NET 2005, [CODE]HRESULT hr = spCrypt.CoCreateInstance(__uuidof(Cryptographer::TMMPlayerHelper), 0); if( FAILED(hr) ) spCrypt = 0;[/CODE] I am facing an error here. I debug the code and found that "CoCreateInstance()" is returning a message "Class is not registered" an my program gets crash. How can I …

Member Avatar for asifjavaid
0
173
Member Avatar for AutoC

Hi, I want to transfer a file as it is via a socket...not read the file contents and send it.How can I do this?

Member Avatar for AutoC
0
1K
Member Avatar for clutchkiller

Im still a newb when it comes to programming so im just curious, i understand as far to where return(0); at the end of a function tells the program their were no errors and to end the program right? But what else can you use return(???); for? And how exactly …

Member Avatar for vmanes
0
273
Member Avatar for piznut25

[CODE]#include <iostream> #include <cstdlib> using namespace std; const int MAX_ARRAY_SIZE = 11; void instructions(); //Explains the program to user. void get_integers(int a[],int size); //Recieves input from user int main(){ int numbers[MAX_ARRAY_SIZE]; instructions(); get_integers(numbers,MAX_ARRAY_SIZE); for(int i = 0;i < MAX_ARRAY_SIZE;i++){ cout << numbers[i] << " "; } return 0; } void …

Member Avatar for vmanes
0
92
Member Avatar for DaveCachia

Hey Daniweb! I'm here again with another C++ problem. I am trying to add three pairs into my main vector 'theMap'. I am thinking I need to use the 'insert' function, but I just cant figure out why my syntax is working. I've tried the 'copy' command as well, no …

Member Avatar for DaveCachia
0
98
Member Avatar for meddlepal

I am having a problem with a class I am writing. I have defined a whole bunch of methods defined that the compiler is telling me in the implementation are different. The errors are: [QUOTE] 1>------ Build started: Project: prog6a, Configuration: Debug Win32 ------ 1>Compiling... 1>main.cpp 1>c:\users\philip\documents\visual studio 2005\projects\cs211\prog6a\prog6a\avltree.h(186) : …

Member Avatar for meddlepal
0
187
Member Avatar for amerninja2

how can i create a c++ program that can somehow connect to a phone and let you talk to them through a computer mic? also how do i create an email program? the email program could also send txt messages (number@carrier.com). can you give me links or code and an …

Member Avatar for mrboolf
0
108
Member Avatar for mathrules

I am having issues trying to set up a makefile in Crimson Editor. I know that I need to link my files but I am not sure what that is exactly. I have included my filename.h in my implemenation file and main. Everytime I compile i get nasty errors saying …

Member Avatar for mathrules
0
75
Member Avatar for freelancelote

Hi, let's say I define this two classes that do not inherit from one another. I get an error at line 10: field "DataNoFather" has incomplete type. 1.Any idea what that means and how to fix it? 2. Is it possible to have a variable like DataNoSon labeled with type …

Member Avatar for freelancelote
0
106
Member Avatar for CPPRULZ

I am doing an online course and for one of the chapters (in [U]Practical C++ Programming[/U] by Steve Oualline) it had a bitmapped graphics section-only 4 pages long. The chapter is about bit operations and includes a section about hexadecimals. I understoodit until I got to this passage in bitmapped …

Member Avatar for ddanbe
0
296
Member Avatar for Trekker182

I have a small lab where I'm trying to dynamically allocate an array to hold whatever number of scores. We were given the code to pass it into a function that sorts those scores via pointer notation. However, when I try to pass the array into the function, I get …

Member Avatar for ArkM
0
468
Member Avatar for muya08

my program has the following errors: there are primary-expressions expected before "else" the upon commening on the lines with else, i got a mistake like "core dumped" and it couldn't run no more. could anyone please take a minute to go through my programm and kindly let me know where …

Member Avatar for ArkM
0
134
Member Avatar for thegodfather96

hello i am new in the programing and i want то learn c++.Where i can find good tutorials about c++ ---------------------------------------------------------------------------------------------------------- Thanks in advance

Member Avatar for Alex Edwards
0
54
Member Avatar for AcidG3rm5

[code] #include <iostream> #include <string.h> using namespace std; class Date { public : Date(); void setDate(int,string,int); void printDate(); private : int day; string mth; int year; };//end class //date constructor Date::Date() { day = 01; mth = "Jan"; year = 1990; } //setDate void Date::setDate(int inDay,string inMth, int inYear) { …

Member Avatar for ArkM
0
119

The End.