49,761 Topics

Member Avatar for
Member Avatar for stereomatching

I need to make the last 5 bits of the unsigned int become zero(1111_1111 to 1110_0000) There are two solution [code] unsigned int number = 0xFFFF; unsigned int temp_one = number & (~0x1F); unsigned int temp_two = number >> 5 << 5; [/code] which one is faster? I write a …

Member Avatar for mrnutty
0
118
Member Avatar for LacyMacy

[CODE]//So I'm writing this program that converts change into smaller denominations. //For example .97 would be 3 quarters, 2 dimes, 0 nickels, with 2 remaining. //The program compiles and runs but it's not the completely correct output. Can //anyone help. //Converts change into small denominations. #include "stdafx.h" #include<iostream> #include<conio.h> using …

Member Avatar for Lerner
0
205
Member Avatar for siaswar

There is a threaded bst class program. I want to have a delete function for this class. every time I tried to write, not work. how can I have a delete func as simple as other funcs. I googled a lot but all codes are written with structs not with …

Member Avatar for WaltP
0
114
Member Avatar for jbrunet

I have a DLL file written in C++, using Microsoft Visual Studio 2008. The socket class coding is an adaptation of [url]http://www.adp-gmbh.ch/win/misc/sockets.html[/url] and the whole thing works when compiled as a 32 bit DLL, but the Internet connectivity does not work when I compile it as a 64 bit DLL. …

Member Avatar for jbrunet
0
202
Member Avatar for hsayid

[B]Parallel Resistance[/B] i am trying to input and calculate this for any given number of resistors and any value of the resistors. the formula is [B]1/R= 1/R1+1/R2+1/R3.........+!/Rn[/B] Could someone tell me how to input this into C++ could u explain a little on how to do this aswell. Thank you …

Member Avatar for studentba065
0
6K
Member Avatar for cangan

Hi list, Three functions use the following items vector. Where/how should i put the vector to make this possible ? Any reference to related sources will be appreciated. [CODE] vector< vector<int> > items ( 6, vector<int> ( 6 ) ); [/CODE] P.S I tried to make it static but it …

Member Avatar for cangan
0
123
Member Avatar for adityawkhare

[CODE]// DETERMINANTS by a.w.k [COLOR="red"]#include<conio.h> #include<iostream.h> #include<stdlib.h>[/COLOR] int main() { int ex,choice,a,b,c,d,e,f,g,h,i,ans; char repeat; clrscr(); do{ cout<<"\n Determinant Solver [with Explaination]"; cout<<"\n Enter your choice..."; cout<<"\n\n Press [1] for 2x2....\n \n Press [2] for 3x3...."; cin>>choice; clrscr(); if(choice==1) { cout<<"\n Enter 4 values of Determinant...."; cin>>a>>b>>c>>d; clrscr(); ans=(a*d-b*c); cout<<"\n Entered …

Member Avatar for PrimePackster
0
152
Member Avatar for Nandomo

I have a running calculator on VC++ and don't know how to get an exit button to work. (The X on top right works fine, but want an exit button) I have tried OnOK(); this->CloseWindow(); And other things. Still not managing to close the program from the button. Any tutorials …

Member Avatar for anuj.juthani
0
3K
Member Avatar for Rdel

been studying c++ for a while and downloading sample codes in the internet.I just wanna ask what is cpu.h for cause im running this program (see codes bellow)many times debug all other problem the only remaining thing is that when i run it (im using dev c++) it always says …

Member Avatar for Dexxta27
-1
1K
Member Avatar for poolet

Hello, I have a strange problem and I need some help... I am working with a project that the compiler create a txt file and save the informations of the user as the user enter... The program create only ONE file and overwrite eatch time... The problem is that the …

Member Avatar for WaltP
0
196
Member Avatar for triumphost

In pascal, you can have something like the following: [CODE] type TPoint = record X, Y: Integer; end; TPointArray = array of TPoint; T2DPointArray = array of TPointArray; [/CODE] In C++ I tried to replicate this and failed miserably. [CODE] struct Point { X: Integer; Y: Integer; }; struct PointArray …

Member Avatar for triumphost
0
7K
Member Avatar for MrEARTHSHAcKER

Hi, I need to create 39 images in Borland and set what will they do if you click on them. It'd be really long time to create all these using classic method ( adding images, and setting OnClick option ). But I figured out how to insert so many bitmaps: …

0
68
Member Avatar for CurlyFried

Right, i'm REALLY new to this whole thing, coding and everythiong. But for my first proper project I've decided to make a Text Based RPG. I've got most of it done now, but am having problms working out how to make random damage from the enemies. At the moment, each …

Member Avatar for WaltP
0
203
Member Avatar for aeiou2001

need someone to please explain for me the program below for fibonacci.. urgent.. my friend need it for him to land a job.. need a hand for this one please #include<iostream.h> #include<conio.h> void main() < clrscr<> int a=0, b=1, c; cout << a << endl; cout << b << endl; …

Member Avatar for Narue
-3
133
Member Avatar for Awais Ali

hy guyz, I want to create a windows '[B][I]shell[/I][/B]'(CLI based) in [U]C++[/U] (like Windows cmd) which has ability to Create folder or file, copy and paste and delete folders or files... So plz help me and tell me the which libraries will use because i have no idea about this. …

Member Avatar for thines01
0
687
Member Avatar for Binod199

Hi, I am looking for Code Analysis Tools to test ATL Projects using VS 2005. so far i have evalutated following tools: 1. FxCop 2. PREfast 3. Cppcheck [B]Problems i Faced with these tools[/B]: when i use Fxcop it gives message "FxCop Engine failed to load". The project i am …

Member Avatar for MastAvalons
0
296
Member Avatar for Hajira Khanum

Hi everyone:) I am still not able to complete this:( can anyone please help!!! [CODE]#include<iostream.h> #include<conio.h> class bingo { public:int a[5][5]; void input(); void play(); }; void bingo::input()//input a 5*5 matrix { int i,j,num,check=0,l,m; cout<<"\n Enter numbers 1-25\n"; for(i=0;i<5;i++) { for(j=0;j<5;j++) { cin>>a[i][j]; num=a[i][j]; for(l=0;l<5;l++)//check if number has repeated { …

Member Avatar for Hajira Khanum
0
171
Member Avatar for PrimePackster

Here i have a working code, what i want to know is: When the user inputs elements to the array, i want it to be automatically aligned in form of an matrix. Instead of [ICODE] 1 2 3 4 5 6 etc....[/ICODE] But just as a matrix, like this [ICODE] …

Member Avatar for PrimePackster
0
257
Member Avatar for Youg

Although, I could easily state quite a few people will be bored with these, I couldn't find someone else with my problem. The code below runs, though doesn't decrypt. It gets to the first "Error: Unidentified Character" and ends. Any help great appreciated. [CODE]#include <iostream> #include <string> #include <array> #include …

Member Avatar for Youg
0
244
Member Avatar for TheFearful

Hey guys, I am confused on how to do this code. The specifications are in the attachment. It is a word file. This is the code that I have so far. It does not work to what is asked for and I don't know where to go from here. [CODE] …

Member Avatar for raptr_dflo
0
112
Member Avatar for thecoolman5

Hi. I am just wondering how to restore a number that is in scientific notation. So, take a number that is in scientific notation, turn it into standard form, and resave the variable in standard form. here is an example of outputing the variable amount in standard form: [CODE]n1.setf(ios::fixed); cout …

Member Avatar for raptr_dflo
0
242
Member Avatar for iamuser_2007

Hey guys I am learning CPP, I am looking for some topics material but I couldn't find any helpful material any where. It is also not available in my C++ Book, These topics are from older edition of C++. [ICODE] The Locator Design Pattern, Tracking Elements as they Move Defining …

Member Avatar for raptr_dflo
0
143
Member Avatar for black22622

Turbo C++ is showing declaration syntax error with this statement. Help. void main() { test s; int ch,roll; char name[30],choice,join; clrscr(); It is showing the error with the ' { ' . I have used proper header files and stuffs, and this is just a part of my 700 line …

Member Avatar for raptr_dflo
0
4K
Member Avatar for babyhuyx

Simple tic tac toe game against CPU, however, I'm printing out the results of the AI part and its coming up with some really large numbers that aren't suppose to be there. After the computer's first move, it just crashes and goes into endless loop. Where did I go wrong …

Member Avatar for raptr_dflo
0
130
Member Avatar for gj_1311

Hi, I have to run purecov with purify in unix. What is the command to run both together in a single line?? What options have to be set for purify and purecov?? Please suggest me some solution... Thanks, GJ

0
33
Member Avatar for nijinjose123

Hi, Could anyone please help me in writing code to convert Hex Values to ASCII Thanks

Member Avatar for raptr_dflo
0
1K
Member Avatar for Topherman

[CODE][/CODE]hey, this program is supposed to display 50 random numbers, which is does already, average those numbers, find the maximum,minimum, and mode of the numbers. I haven't started on the mode yet, but i dont see why the other things don't work. Did I initalize it wrong? [CODE] #include<string> #include<ctime> …

Member Avatar for raptr_dflo
0
1K
Member Avatar for srinivas88

In a client server program ... generally when the server goes down the client on executing the send command 2 times returns a SIGPIPE signal . I want to know y this happens. The client must recieve sigpipe immediately when it sends a message after the socket connection is broken …

Member Avatar for srinivas88
0
387
Member Avatar for maverick01

the uploaded is a assignment and i want to solve this task using the library fstream and using the tellp ,seekg other functions also can some body help me in that how to use all these things..!!I WROTE A FUNCTION ALSO BUT IT IS NOT READING THE FILE??? THE FUNCTION …

Member Avatar for MandrewP
0
234
Member Avatar for hekri

Hi I'm new to this. I'm a mechanical engineering student and have to learn c++, i have this book and there's a program source code. My question is: why do we need to include ctime in this code and what is it good for? [CODE]#include <iostream> #include <cstdlib> [B]#include <ctime>[/B] …

Member Avatar for hekri
0
3K

The End.