49,757 Topics

Member Avatar for
Member Avatar for Begjinner

When you use char(130) you get the é. When you do int('é') you get -23... and with my program to get value it is -126... How on earth can I get the 130 value when entering the é ? Thanks for looking. With this program I printed out the letter …

Member Avatar for Duoas
0
132
Member Avatar for ssquared

I'm writing a C++ program in which I need to display the bits that represent both a 32-bit and 64-bit floating point number. I had no problem properly displaying the 32-bit number, but I'm having trouble with the 64-bit number. This is the code that I'm trying to use: [CODE] …

Member Avatar for ssquared
0
224
Member Avatar for timbomo

Im trying to figure out how to error trap this program so if the user doesnt put in a valid response then a message will cum up and they will go back 2 the beginning until they do it correctly. also i want to subtract the money they spend and …

Member Avatar for WaltP
0
97
Member Avatar for miteigi-san

NOTE: ~this code is in c++ ~you need not change anything in the code ~the commented lines are there just in case you want to see how the program works in real time - simply uncomment them and run the program, these commented lines are not necessary for the program …

Member Avatar for dusktreader
0
372
Member Avatar for timbomo

How can i make this into a menu where you select a letter and you get a response that reads you have choosen "a" which is $2.50 /* SIUE's bookstore is having aspecail sale on tiems embossed with the cougar logo. For a limited time, three items, mugs, teeshirts, and …

Member Avatar for Lerner
0
106
Member Avatar for C++ Beginner

Problem: Write a class that defines a car. The car class stores the following data about a car: [B][U]Member Name Data Type[/U][/B] make string model string vin string owner string doors int mileage float gas tank float trip float gas remaining float Create methods to set data into the data …

Member Avatar for jonsca
0
458
Member Avatar for nkinar

Hello-- I've been writing some code in C++ to test the [I]tffs-lib[/I] library, which is written in C. The library provides functions for directly accessing a FAT file system from within a program. Although most modern operating systems have drivers for accessing the FAT filesystem on SD cards, I am …

Member Avatar for nkinar
0
288
Member Avatar for I0adidas0I

OK I need some help... so far ive been able to get everything on my own but...im making a program that selects questions from an array numbered 1-40. i put in a random fuctions so the questions are chosen randomly. but i want to have it so that theres no …

Member Avatar for peter_budo
0
157
Member Avatar for ms_farenheit1

I have been having a lot of trouble getting my overloaded operators to properly with each other, especially in cases such as a=a+b+c When I execute the program, I get an error: "Unhandled exception at 0x01201f10 in Project1_v3.exe: 0xC0000005: Access violation reading location 0xcccccccc." But I am not sure exactly …

Member Avatar for jonsca
0
117
Member Avatar for jesoj

Hi All, Can anybody help me with source code to obtain dynamic run time binding without using virtual functions in C++. I would like to use my own pointer just like VPTR and a table (array) like VTable. Thanks in adv, Regards, JE

Member Avatar for Salem
0
219
Member Avatar for vinodhkumar
Member Avatar for Salem
-1
43
Member Avatar for vipin_98
Member Avatar for Salem
0
44
Member Avatar for invisi

It doesn't compile, why? [CODE]#include <iostream> #include <string> using namespace std; int main() { for(int cnt1 = 0, int cnt2 = 10; cnt1<10; ++cnt1, --cnt2) { cout << cnt1 << "--------Hello!---------" << cnt2 << endl; } system("PAUSE"); }[/CODE]

Member Avatar for WaltP
0
252
Member Avatar for OmarOthman

Dear All, I want to do two mathematical operations, say [CODE=c] a / b [/CODE] and [CODE=c] c / d [/CODE] then test whether they are equal. I'm really very bad at computer errors, I think I need to read more about it (any reference is welcome). So, my question …

Member Avatar for WaltP
0
159
Member Avatar for anthony5557

I wonder if anyone can help me. I'm suppose to write a program to ask the user to enter the file they want to display and display the file they want 24 lines at a time. It pauses at 24 and asks them to press enter and displays the next …

Member Avatar for WaltP
0
100
Member Avatar for chinnaedu

hi all....i have small problem with replacement of part of a character array..... my problem is i have character buffer buff[] the content in it is "DESCRIBE rtsp://<ip-addr>:9000/2.sdp RTSP/1.0 CSeq: 1 Bandwidth: 384000 Accept-Language: en-US User-Agent:Windows NT 5.1Service Pack 2)" now here i want to replace "9000" with the number …

Member Avatar for tetron
0
109
Member Avatar for tetron

I have a std::string (char *, std::string::size_t ) constructor failing and I am not sure why. For my small test file there was no problem, but when using ifstream::read() with an unsigned int sz of 1Gb (1073741824) (I think that I used a pos_type 1st time) and the resulting char* …

Member Avatar for tetron
0
208
Member Avatar for spirit3ch

Hi guys, I am supposed to implement a sequence using linked list. But I seem to have an error in the code. As I am getting trash for the results of the concatenate function. It might be a problem with my constructor too. I am not sure. Please help. I …

Member Avatar for spirit3ch
0
1K
Member Avatar for TheGhost

my code includes this function void read(set<string> &mySet); but when i put this line in the header file, i get the following errors: error: variable or field 'read' declared void error: 'set' was not declared in this scope error: 'string' was not declared in this scope error: 'mySet' was not …

Member Avatar for JasonHippy
0
116
Member Avatar for khevz09

My only problem is the spacing..... to make it right.... i need to make it inverted pyramid pattern... like this: [CODE] 9 8 7 6 5 4 3 2 1 9 8 7 6 5 4 3 2 9 8 7 6 5 4 3 9 8 7 6 5 …

Member Avatar for tetron
0
83
Member Avatar for TheGhost

hi, i need to send keystrokes an application (including, "enter", "left arrow", "right arrow", etc). but how do i do that? i do not see any short and useful examples to doing it. all i have got at the current moment is to get the foreground window using HWND foregroundWindow …

Member Avatar for VilePlecenta
0
152
Member Avatar for tetron

I am having problems with the new operator() specifically within std::string I appear to have hit a memory limit in visual studio. Ideally I would like someone to help me find one of the following solutions: 1 - Can I access the memory in a very big file directly without …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for mrinal.s2008

Hi, I'm able to write a copy constructor for a class which contains pointer as a data member. However, when I have a reference as a data member, the copy constructor does not help, i.e. when I change that member for one object, the change is reflected in another one …

Member Avatar for JasonHippy
0
1K
Member Avatar for elexender

Hi, Im pretty new to c++ programming so plz dont be offended if i ask "stupid" questions. Im want to open a file named "Alexander". The name of the file is stored in an Ansisting. So i want to add an ".txt" extension to open the file. Then i want …

Member Avatar for elexender
0
134
Member Avatar for dani_awais

HEllo everybody !!! i have a little problem.. i m making a program in which i have to do bitwise addition. mean if the 1st input is 111 and the 2nd input is 11 then the output is 1010 i have made my logic but where i have the problem …

Member Avatar for adnan.siddique
0
78
Member Avatar for invisi

I wrote this programme but what two numbers you choose exit it? can you guess just by looking? Because I can't :( [CODE]#include <iostream> #include <string> using namespace std; int main() { bool aHo = true; int a = 0; int b = 0; while(aHo) { cout << "Enter Number …

Member Avatar for invisi
0
79
Member Avatar for falconxxxx

Hi I am currently writing a program that would take a number, then compare that number to numbers in a file that I have opened. I am having a few problems. This is what one of the functions I am having a problem with looks like: the function receives a …

Member Avatar for anishakaul
-2
211
Member Avatar for moein_soltani

Hello all, I have registerd lately, we have a project about the implemention of huffman algorithm...! I have some problem... first is that I want to read space and Enter from txt file how can i do that? Next is how i should output to say that 0 and 1 …

0
76
Member Avatar for hannaxbear

The function I am trying to write is supposed to be recursive and does the following: Return the number of ways that all n2 elements of a2 appear in the n1 element array a1 in the same order (though not necessarily consecutively). The empty sequence appears in a sequence of …

Member Avatar for hannaxbear
0
153
Member Avatar for zaraf

Dear All, Lately during one of my projects i have encountered a problem and stuck on that point. I have an optical sensor that i have attached to my pc and it detects colors in terms of RGB values. The sensor is from a famous company and has been supplied …

Member Avatar for zaraf
0
170

The End.