48,986 Topics

Member Avatar for
Member Avatar for Zssffssz

ok all I need is to learn how to convert a char variable into a acsii byte and back again. €£¥$ Edit: I know about typecasting or something and it's not exactly what I need because I wat to store the new variable in a int vareuble and I don't …

Member Avatar for Fbody
0
148
Member Avatar for FRGT/10

Please help me with my problem in algorithm coding.. the error says no matching function call .. i attach the picture in this thread hoping u help me :)

Member Avatar for homeryansta
0
305
Member Avatar for FRGT/10

Project: Binary Tree ADT Transformers: 1. Add Node (You may follow BST rules for adding and deleting) 2. Delete Node Observers: 1. Node Count 2. isRoot 3. isParent 4. isChild 5. isSibling 6. isAncestor 7. isDescendant 8. isLeaf 9. Indegree 10. Outdegree 11. Traversals (pre, in, post, level-order) .CPP CODE …

Member Avatar for homeryansta
0
236
Member Avatar for stereomatching

What is the meaning of using dynamic_cast without any error handling? Like [code] struct base { virtual void testing() { std::cout<<"base"<<std::endl; } }; struct derived : public base { virtual void testing() { std::cout<<"derived"<<std::endl; } }; int main() { base baseInstance; derived derivedInstance; base *bp = &derivedInstance; base &br = …

Member Avatar for stereomatching
0
220
Member Avatar for Will Gresham

Hello, I am having an issue with C++. I am relatively new to this language. The issue I am having is that I am unable to use a variable declared as private in my class. Definition: [code] class Matrix { public: Matrix(void); Matrix(int rows, int cols); Matrix(const Matrix& m); ~Matrix(void); …

Member Avatar for JasonHippy
0
159
Member Avatar for stereomatching

[code] void testRR(std::string &A); [/code] [code] void testRR(std::string &&A); [/code] Which one is better? && is more flexible than &, should I choose && rather than &? Thanks

Member Avatar for stereomatching
0
122
Member Avatar for Kron

Ok, so basically I have an assignment in which I have to determine if what the user typed in is a number between 0-9, a letter or a symbol. The commands I can use are: [CODE]cout endl system("pause") system("cls") #include<iomanip> setw(#) setfill('ch') "\t" cin getline(cin,s) bool char int double string …

Member Avatar for Narue
0
235
Member Avatar for yup790

I was wondering which language should learn. I do not want to be a programmer for a job(at the moment I am a young teen) in the future, I would like to be a physicist. In the meantime though I would like to learn a programming language. I want to …

Member Avatar for JamesCherrill
0
254
Member Avatar for homeryansta

[CODE=C++]void List::remove_last() { if(first == NULL) { first -> data = ' '; } else { Node *newnode; newnode = new Node; newnode = NULL; newnode -> data = last -> back -> data; last = newnode; } }[/CODE] am I doing something wrong? I'm trying to remove the end …

Member Avatar for sunn shine
0
174
Member Avatar for bennetk2

[CODE] #include <iostream> #include <iomanip> // set width and decimal #include <fstream> // use file input and output #include <cstring> // use strings using namespace std; ifstream infile; ofstream outfile; string input(string, int); string copy(string, string, int); string breakup(string, string, string, string, int); string capt(string, string, string, string, int); string …

Member Avatar for vidit_X
0
987
Member Avatar for YaelGD

Hi, I need to draw a right triangle, based on the height and the base of it. An Isosceles one is easy to draw, but a randomly chosen relation between the height and the base (which gives me a right triangle other than 90, 45, 45) needs to be based …

Member Avatar for sungaw
0
2K
Member Avatar for vidit_X

I need to write a program, which prints out all the prime numbers between two numbers. The first input specifies the number of test cases, followed by the limits. Here is an example.. [QUOTE] Input: 2 1 10 3 5 Output: 2 3 5 7 3 5 [/QUOTE] I wrote …

Member Avatar for Rashakil Fol
0
153
Member Avatar for Stang51

Hi, I'm new here I searched for any possible way to fix my issues, but I have not found anything that I can understand, so I figured I would post my code here. In my C++ class I was asked to take a craps program and modify it to take …

Member Avatar for Stang51
0
1K
Member Avatar for khevz09

MY problem is ..... Given an input 'n' came from the user and display a pattern. but my code is very long .... my code is only for 1-10 numbers i need to display any numbers that input of the users can u give me some short code or advice …

Member Avatar for cejay2b20
0
1K
Member Avatar for justincuppen

Hello I need help figuring out how to write a loop program that behaves a certain way, I have been beating my head off of walls trying to figure this out and it is probaby so easy.. This is the expected behaviour: $ ./a.out Enter some text on 1 or …

Member Avatar for justincuppen
0
124
Member Avatar for justincuppen

Hello I am attempting to write a program that will convert temperature from c to f and vise versa. However I need this program to stop when choice == 'q' and i am having a horrible time with it. here is the code that i have been working with. any …

Member Avatar for vidit_X
0
147
Member Avatar for bobytch

Good Day Everyone here is my code so far [CODE] #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> void vp(int x,int tc,int bk,char *text); void square(int x,int y,int size); void main() {//=========================================================== int gdriver = DETECT, gmode, errorcode; initgraph(&gdriver, &gmode, "C:\\TC\\BGI"); //------------------monitor-------------------- setbkcolor(0); setcolor(15); square(300,160,150); square(300,160,148); square(300,160,130); square(300,160,131); setaspectratio(2,5); int …

Member Avatar for vidit_X
0
280
Member Avatar for GSLENK

Program runs fine with me, the cout's work. IDK what this means every cout from line 17 to 71, and the system ("pause") on line 72 are all warning marked as ambigious. It started happenning when i put the "while (occupiedRooms > rooms)" in. I think thats when the errors …

Member Avatar for vidit_X
0
332
Member Avatar for Kron

Ok, so basically I want a program which can determine if what the user typed in is a number between 0-9, a letter or a symbol. The commands I have to make it with are: [CODE]#include<iostream> #include<iomanip> setw(#) setfill('ch') bool char int double string #include<string> #include<cmath> #include<windows.h> → directiva utilizada …

Member Avatar for NathanOliver
0
86
Member Avatar for toneatles

Hello all, I have a assignment for school that I am having trouble with. I have to write a program that will list all primes numbers of an inputted number. I have the code and it compiles with no errors, but when I run it after i input the number, …

Member Avatar for vidit_X
0
172
Member Avatar for temmyb

So I cant get the division to work on my c++ homework. This is a diceroll game and im trying to get sum1=num1/diceRoll to get the percentage of # of times divided by the amount of time the dice is being rolled. It keeps giving me 0 because I assigned …

Member Avatar for temmyb
0
206
Member Avatar for Vidgie65

These are the errors the compiler is giving me on these lines od code - any help understanding or fixing this issue ???? \extpersontype.h(35) : error C3646: 'extPersonType' : unknown override specifier \extpersontype.h(37) : error C2091: function returns function \extpersontype.h(44) : fatal error C1903: unable to recover from previous error(s); …

Member Avatar for Moschops
0
264
Member Avatar for syaminismail

1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers in ascending order. Write down in a table the time (according to your system clock) that it takes for the program …

Member Avatar for Narue
0
222
Member Avatar for Zvjezdan23

This is code for building a white window in direct X. The problem is, when I debug, I get this error. 'Chapter1_DirectXWindow.exe': Loaded 'C:\WINDOWS\System32\uxtheme.dll', Cannot find or open the PDB file The program '[2536] Chapter1_DirectXWindow.exe: Native' has exited with code -1 (0xffffffff). [CODE]#include <Windows.h> LRESULT CALLBACK WndProc(HWND hwnd, UINT message, …

0
76
Member Avatar for dospy

i've seen many programs using printf( ) for outputing(probable ported from C) but anyway, is there any difference between printf and cout? also i've seen many functions(expecially in windows.h) using w_char*(wide char string) as arguments or return value(and it bugs me because it makes difficult to use with strings) what's …

Member Avatar for dospy
0
258
Member Avatar for ntrncx

1) what exactly is the difference in a constructor if you put reference on it? example[CODE]ConstructorX(string first):firstName(first)[/CODE] with [CODE]ConstructorX(string &first):firstName(first)[/CODE] 2) [CODE]const Array &operator=(const Array&)[/CODE] the first const what exactly means?the const in the parenthesis is that the object is constant if its at the end means the function cannot …

Member Avatar for dospy
0
224
Member Avatar for DSTR3

I have a map that is not returning the correct number. First it did, then it didn't now it's just messed up. Any help is appreciated.Thanks. [CODE]struct file_data { std::wstring sLastAccessTime; __int64 nFileSize ; }; int GetFileList(const wchar_t *searchkey, std::map<std::wstring, file_data> &map) { WIN32_FIND_DATA fd; HANDLE h = FindFirstFile(searchkey,&fd); if(h …

Member Avatar for MonsieurPointer
0
270
Member Avatar for L0s3r

Hi Guys. Random no.'s always bother me.So,I want to start a discussion over their uniform distribution. Given : rand5() which generates randomly distributed no. from 1-5. To Code: rand7() which generates randomly distributed no. from 1-5. You have to give code using rand5() as well as without using it. Thanks,

Member Avatar for StuXYZ
0
160
Member Avatar for ctjh900801

I am using VB.net to develop an application, but there needs to be applied to the dll technology. So come here to seek help. First I will describe the features I need this dll I want to monitor an application's window to get in on a PSD_ENVSTAMPRECT the lParam value. …

Member Avatar for ctjh900801
0
330
Member Avatar for ussra2

I have looked around the website using the search and have seen old post so I am posting a new question most likely to an old answer. I am trying to read data from a file into an array and then pass it on to a function. I also have …

Member Avatar for WaltP
0
955

The End.