49,757 Topics

Member Avatar for
Member Avatar for jackmaverick1

Hi! I've been making a rather large (but not huge, by any means) program and it needs, or so I think, a couple of classes and I want them to use inheritance to make my life easier. However, when I try to include all of my files in the main …

Member Avatar for jackmaverick1
0
217
Member Avatar for Peter4n31

I am quite desperate about a random crash. The memory could not be "read" error. I would be very happy for any help. Thank you. [CODE]HRESULT CSceneNode::UpdateAll() { D3DXMATRIX backup_local_tm = ei.world_tm; Update(); SceneNodeIterator begin=FirstChild(); SceneNodeIterator end=LastChild(); for (;begin!=end;begin++) { (*begin)->UpdateAll(); // Here is the random Crash !!! } ei.world_tm …

Member Avatar for Peter4n31
0
189
Member Avatar for shanker31
Member Avatar for eman 22
Member Avatar for m4ster_r0shi
0
573
Member Avatar for Labdabeta

I just observed an unusual phenomena in my code. I am wondering if anyone can explain it. [CODE]void dofunc(int a, int b){a+=b;} void foo(int near,int far){dofunc(near,far);}//Syntax error, expected primary expression before , and ) void poo(int vnear,int vfar){dofunc(vnear,vfar);}//Compiles fine?[/CODE]

Member Avatar for Salem
0
166
Member Avatar for Buolbear4444

I can't find the C/C++ drop down menu. I know it's basic, but how do you change it? Was there some kind of update?

Member Avatar for Ancient Dragon
0
178
Member Avatar for ztdep

I am using VS 2008 to creat a windows program, but ican not found the Message button. Could you please help me

Member Avatar for sergent
-2
97
Member Avatar for FriXionX

So, I joined DaniWeb in february, and posted a problem regarding this code. I then quit learning for a while, and started again a week ago or so, continuing this. I've made it better, and its almost working, except for the If statement doesnt work. It asks you what you …

Member Avatar for FriXionX
0
116
Member Avatar for UltimateKnight

I am using Microsoft Visual C++ Express 2008 edition and notice some code is not working in here. There are different functions and some headers are not recognized while in other are. So is the compiler not good? I've heard about Dev C++ and Turbo C++ but haven't tried them. …

Member Avatar for UltimateKnight
0
100
Member Avatar for nocloud

I have a number of functions I would like to reuse in multiple pieces of code. I have put these into a single header file that looks something like the following: [CODE] #ifndef FUNCTIONS_H #define FUNCTIONS_H //function prototypes extern float sum(vector<float> &v); //calculate sum of a vector float sum(vector<float> &v) …

Member Avatar for Schol-R-LEA
0
416
Member Avatar for SakuraPink

Hi all, I am working on a data file that looks like the following: [CODE]value1: 0.7586 +/- 0.00473 value2: 0.664901 +/- 0.0357 value3: 0.662784 +/- 0.00447 ------------------------------------------------------------------------------------------------------------------------- value1: 0.765217 +/- 0.00425 value2: 0.694663 +/- 0.0277 value3: 0.66438 +/- 0.00393 ------------------------------------------------------------------------------------------------------------------------- value1: 0.758317 +/- 0.00332 value2: 0.648057 +/- 0.0201 value3: 0.660746 …

Member Avatar for SakuraPink
0
159
Member Avatar for henrimontreal

Hi guys, Actually I have a problem to use two classes at the same time. For example when I increment the number of winnings at the function of the 2nd class and want to show the result at one of the functions at the first class. the variable I used …

Member Avatar for VernonDozier
0
828
Member Avatar for akhal

Hej Its too simple looking but I need c++ code to round off any floating point number to the nearest 1000th. I read somewhere to do it like this: [code] double number = cos(theta); double rounded_1000th = floor((x*1000.0 + 0.5)/1000.0); [/code] But this solution fails for numbers less than zero …

Member Avatar for WaltP
0
56
Member Avatar for klikeras

Hello, I need help with an assignment, been trying to figure it out for couple of hours with no luck, hope someone here can help me, i would be extremely grateful. I need to create a 2D array 5x4, each row represent a student and each column respresents a subject. …

Member Avatar for prvnkmr194
0
147
Member Avatar for paperstars

Hi, I'm new to C++, I'm trying to write a program to compute the sine series for taylor expansion. I've written two codes, but both do not work after a certain point. (The sine series is: sin x = x - (x^3/3!) + (x^5/5)...etc.) With the code below, when x=1.5, …

Member Avatar for paperstars
0
2K
Member Avatar for goody11

Hello, I'm trying to write a vector that has a list of installed program names to a text file. When I go to do this, the program shows the names of the installed applications, but in the text file it just repeats the number 52428. Any ideas? Here's the code: …

Member Avatar for goody11
0
276
Member Avatar for UltimateKnight

Hey all. When you have the whole program running, and is executed it's running at the black console window. How are the programs made so that they run with GUI interface and stuff like that? Are they exported differently and where are the images and things put together ? Thanks.

Member Avatar for ichigo_cool
0
318
Member Avatar for SasseMan

Hello all! I'm having problems with running c++ on iOS. I have a iOS openGL project in Xcode 4 and an external library written in c++ that has to be a dependency to the iOS target so it can run on an Ipad. right now I'm testing with the iPad …

Member Avatar for SasseMan
0
101
Member Avatar for akhal

Hi I am working on fast fourier transform where I have to use std::complex<> template class types. I have a situation where I want to calculate nth roots of unity as follows w = pow(e, 2*pi*j/n) Where e is eulers constant, and j=sqrt(-1.0); But this doesnt work for me as …

Member Avatar for akhal
0
303
Member Avatar for king03

Hi there guys I need some help I am creating an inventory with loads of exception handlers, I got a problem with isalpha and isdigit because supposedly it will detect whether an input is a char or a digit... Ok I tested a simple program to show my problem. I …

Member Avatar for MareoRaft
0
596
Member Avatar for montjoile

Hi, I have the structure and the insertion method of a btree, but I need to do the traversal method. I have this so far: [CODE]void inorden(btree r){ //inorder for (int i=0; i<=r->peso; i++){ //n+1 branches if (r->rama[i]) inorden(r->rama[i]); if (i<=r->peso-1 && (r)->clave[i]) printf(" %i", r->clave[i]); } }[/CODE] The problem …

Member Avatar for rubberman
0
95
Member Avatar for tikoti

Hi all! I've read forward declaration is much prefered than include in header files mainly because it reduces the compilation time. Other reasons? My particular situation is that all header files that I use are within a namespace. I've seen two different ways for forward declaration in this case: [CODE] …

Member Avatar for tikoti
0
196
Member Avatar for rEhSi_123

Hi Guys, I am working on converting a console application into a user friendly GUI. The actual application is written in visual C++ and person has no information none what so ever on how to run it. So to understand the technique I am trying to experiment with the application. …

Member Avatar for JasonHippy
0
337
Member Avatar for milan2011

Hi, I am trying to make a bank application that has two interfaces.One is the employee interface that lets employees to create an account and assign a IDnumber to each account(lets say the bank only accepts 100 accounts) and a balance for each account. The employee can also close an …

Member Avatar for pseudorandom21
0
520
Member Avatar for yoni0505

I had a problem with some program I wrote that edit specific values within a specific file. When I saved the values, using fstream's write() function, everything between these values became null. I've looked again in the I/O tutorial - [URL="http://www.cplusplus.com/doc/tutorial/files/"]http://www.cplusplus.com/doc/tutorial/files/[/URL] and saw that they use memory block at the …

Member Avatar for yoni0505
0
355
Member Avatar for cretaros

How to i implement loops to print the initialised word as foloows: Thanx in advance. p pr pro prog progr progra program programm programmi programmin programming programmin programmi programm program progra progr prog pro pr p

Member Avatar for nmaillet
0
385
Member Avatar for MareoRaft

x.find() does not return the proper values for x.find('J'), x.find('K'), and x.find('.'). Do you know what could be the issue? It could possibly be x.substr() which is causing the issue. I want the variable q to be "q_J30_K5.txt". [CODE] #include <iostream> using namespace std; short ato( string number ){ return …

Member Avatar for MareoRaft
0
532
Member Avatar for spitfire5295

I am trying to figure out how to make that write out the keys i am typing. How can I accomplish this?[code]#include <windows.h> #include <stdio.h> main() { while(1){ for(short character=8;character<=222;character++) if(GetAsyncKeyState(character)==-32767) printf("%d : %c\n",character,character); };[/code]

Member Avatar for Arbus
0
131
Member Avatar for Labdabeta

I have reinstalled my compiler successfully (finally) and got right back to work. I have created a glModel class as follows: [CODE]class glModel { private: int numv; int numn; unsigned int model; unsigned int textu; unsigned int norma; float *vars; float *norm; public: glModel():numv(0),numn(0){vex=new float[1];tex=new float[1];nex=new float[1];} glModel& Vertex(float tx, …

Member Avatar for Labdabeta
0
153
Member Avatar for kaushik4study

Hi I am facing a problem while using function CreateInstanceFromAndUnwrap(....) in my program. Problem: I do have certain c# dll which i have to load in my c++/cli code.and after that i want to call certain function from that assembly. For example, I do have a dll(C#) in my C:\ …

0
41

The End.