49,761 Topics

Member Avatar for
Member Avatar for gregarion

Hey guys , i have a small problem regarding calculation in c++. Here is an example below [CODE]int main() { int f = -32; int d = 2; int re = d - f; int re2 = 2 - (-32); int re3 = 2 - - 32 } [/CODE] The …

Member Avatar for tkud
0
119
Member Avatar for raj03

I am unable to solve the errors found in this program. Can someone be kind to help me solve it? Thanking in advance. :) [CODE]#include "stdafx.h" #include <iostream> using namespace::std; class detail { protected: char address[50]; int age; char name[25]; public: int a; int b; int c; void getdetail(void) { …

Member Avatar for tkud
0
191
Member Avatar for montjoile

Hi. As far as I know, [B]typedef[/B] is used to assign an alias for a structure or type of data, am I wrong? Is there something more to know about Typedef? thanks

Member Avatar for montjoile
0
142
Member Avatar for ben1996123

Hellochina, I rarely use C++ but yesterday I came up with an idea for a program. What I want to happen is for the program to take a string, and for every letter, replace it with something else (for example, the letter after, or the number of the letter in …

Member Avatar for predator78
0
262
Member Avatar for shrutinr

Hi , I m doing my project in vc++.. I need to interact my vc++ project with NI MAX software.. I m taking Frame API for ineracting to UPS . I included "nican.h" header file for that. I didnt missed any brackets... but while executing i m getting error like …

Member Avatar for Smalls518
0
946
Member Avatar for eng51

I use Borland C++ Builder ver 5 - and always want to make stand alone exes. I now wish to create and use my own libraries. I made a simple .cpp, ran "bcc32 -c mycode.cpp" to create mycode.obj, then ran "tlib mylib +mycode" to create mylib.lib. I created a .h …

Member Avatar for eng51
0
109
Member Avatar for smrati.katiyar

[CODE] #include <iostream> using namespace std; int main() { cout << "enter" << endl; int a,b; cin >> a >> b; cout << a << " " << b << endl; return 0; } [/CODE] in the code given above when the input is INPUT: 45 12 OUTPUT: 45 12 …

Member Avatar for Ancient Dragon
0
125
Member Avatar for I Like Pills

Hey everyone. I was just wondering if anyone who programs for a living or just as a hobby ever gets bored of it? And if not, why do you not? And if you do, what keeps you wanting to continue doing it? Thank you.

Member Avatar for pseudorandom21
0
367
Member Avatar for surferxo3

[code] //Mohammad Sharaf Ali k092094 #include <iostream> #include <iomanip> #include <string.h> #include <math.h> using namespace std; struct tree { char a[20]; int s; struct tree *left,*right; }*root=NULL,*tt[20]={NULL},*temp,*temp2,*t2,*ri,*le; struct pqu { int info; char a[20]; struct pqu *ptr; }*front=NULL,*t,*par,*t1,*p1,*p2; struct pqu* fp(int info) { struct pqu *p=NULL; for(t1=front;t1->info<info&&t1!=NULL;t1=t1->ptr) { p=t1; } …

Member Avatar for thekashyap
-1
130
Member Avatar for deluxnate

Small introduction; been using C++ for two years at college level, and now I've outgrown the console. Having a little trouble in wxWidgets though, since I apparently don't understand how wxButtons work. What I want to do is have a dialog come up with text entry, and an ok button …

0
52
Member Avatar for networkZombie

OK so I have to compare Java with C++ and I need to address the following topics - The following topics should be compared: - programming constructs that are in one language and not the other, differences in - programming in one language or the other should be addressed the …

Member Avatar for meo_beo
0
112
Member Avatar for littlestone
Member Avatar for Saith

I somewhat understand the concept of the parentheses overload when you need to use an object as a function. The question that I have is why does the max variable in the listed code below always input 2. [CODE] /* Purpose: This is the header file of randomInteger.h The class …

Member Avatar for Saith
0
335
Member Avatar for lochnessmonster

[url]http://www.ibm.com/d...rary/pa-dalign/[/url] Can anyone plz explain why , according to this article, an x86 processor can't read simply 4bytes from an odd address and has to make 2 reads then shift bytes to get aligned to the correct value? I dot see why a processor can't read from an odd address …

Member Avatar for mike_2000_17
0
122
Member Avatar for QuesoTaco

I am trying to get consecutive words in a document using flex. Normally the forward slash should work, but for some reason it is not. Also I need to account for spaces. So I can't seem to use that regex character for this, how do I account for consecutive words …

0
132
Member Avatar for surferxo3

[CODE] //Mohammad Sharaf Ali k092094 #include <iostream> #include <iomanip> #define INFINITY 999 //Max Length using namespace std; class Graph { private: int adjMatrix[15][15]; int predecessor[15],distance[15]; bool mark[15]; int source; int numOfVertices; public: void read(); void initialize(); int getClosestUnmarkedNode(); void dijkstra(); void output(); void printPath(int); }; void Graph::read() { cout<<"Enter the …

Member Avatar for template<>
0
209
Member Avatar for milan2011

Hey everyone, I am currently working on a project to create a List ADT that has the following public interface: + size( ) : integer o Returns the number of elements currently stored in the list. o Postcondition: Returns 0 if empty otherwise returns the number of elements. + add( …

Member Avatar for mike_2000_17
0
164
Member Avatar for NordCoder

Hi Daniweb, I've been programming a base class resource manager for a game I'm working on, and so read up on boost's shared_ptr and weak_ptr. I'm done with it and it works and I would really appreciate some feedback on my choice of implementation and design. Am I using the …

0
164
Member Avatar for cppgangster

Hi I am getting an error saying that a class doesnt exist even I did foward declaration: [CODE]class CMyApp: public CWinApp { public: BOOL InitInstance(); }; class NumericOperation; //foward declaration class CMySkaiciuokle: public CDialog { public: CMySkaiciuokle(); virtual BOOL OnInitDialog(); protected: virtual void OnCancel(); virtual void PostNcDestroy(); afx_msg void OnPaint(); …

Member Avatar for cppgangster
0
112
Member Avatar for enakta13

Explanation: suppose an expression -23+5-9/(5*2) is entered then i want output as Numbers: -23 +5 +9 +5 +2 Operators: + - / * () Is it possible?

Member Avatar for enakta13
0
170
Member Avatar for iamuser_2007

Tell me about these and give me some negative and positive code examples. >>Stack Unwinding >>Constructors, Destructors and Exception Handling >>Exceptions and Inheritance thnx for information

Member Avatar for ichigo_cool
0
119
Member Avatar for tux4life

I've written a C++ function which converts an integer to a (C++-)string ... [CODE=C++] ... string s = itos(5698); cout << s << endl; /* Will print '5698' on the screen */ ... [/CODE] You MAY use this code for anything you want but [B][COLOR="Red"]you aren't allowed to sell this …

Member Avatar for ztdep
0
1K
Member Avatar for kchyn

Hi, I'm trying to capture audio from a microphone into a vector in C++. I'm using openAL's example code Capture.cpp (below). I understand that it buffer's the data, but I'm not sure what comes after. In short, what do I do to put the buffer's data into a normalized (+/- …

Member Avatar for raptr_dflo
0
402
Member Avatar for jimJohnson

Finishing this memory mapping palindrome and keep getting file not found. If anyone has the time please take a look at this I debugged to if (argc >1) and that is where I ran into problems. Also could someone also just verify my palindrome is set up correctly? [CODE] #include …

Member Avatar for raptr_dflo
0
215
Member Avatar for Sky Diploma

Hey all, I have a program(using wxWidgets & MySql++ on MINGW) that has to have some Bluetooth Interaction with an Android App. The problem is that I am having trouble finding a framework(API) that would help me send,recieve data over Bluetooth with other applications. I searched and searched all over …

Member Avatar for mike_2000_17
0
1K
Member Avatar for iamuser_2007

hi in my text book i have this problem. how to program this [ICODE] Define a class Quadratic_int that stores the coefficients of a quadratic polynomial in a dynamically allocated array of integers. Supply the "big three" memory management functions. Use this class to demonstrate (a) the difference between initialization …

Member Avatar for sergent
-2
189
Member Avatar for Geek-Master
Member Avatar for JordanHam

I do not need anything too complex, I just need to be able to graph and plot some simple 2D graphs. There is a lot of scattered info all over the internet and at work I dont want to download one of these free softwares and have it blow up …

Member Avatar for ravenous
0
276
Member Avatar for Stefano Mtangoo

Hi, I have a question and I apologize if it is too newbish. I have been for a while now trying to learn OpenGL but I cannot understand how its coordinate systems works. I know coordinate geometry as I did some math long ago as well as equations (linear, polynomial …

Member Avatar for Stefano Mtangoo
0
199
Member Avatar for jamesl22

Hi, I am writing a game in C++ and OpenGL. My whole environment is based on cubes so I guessed bounding box collisions were best. I can currently move around and my program is detecting collisions (I used this tutorial: [url]http://www.3dcodingtutorial.com/Collision-Detection/Collision-Boxes.html[/url]). Now I want to make it so that when …

Member Avatar for jamesl22
0
969

The End.