49,761 Topics

Member Avatar for
Member Avatar for ChaseRLewis

My question is basically if I have a 4D vector like _declspec(align(16)) class Vec4 { float x; float y; float z; float w; } and I want to use operators like `Vec4 a(Vector4.One),b(Vector4.One),c(Vector4.Zero);` `c = a + b; //Creates a 4th Vector4 here that is wasted` It would seem it …

Member Avatar for mike_2000_17
0
163
Member Avatar for np complete

What is it : A simple logic (text based) game, in which you are required to identify the counterfeit coin within 3 chances. How it works : You are given 'x' coins ( best is to play it with 12 coins ). You are asked how many coins you want …

Member Avatar for WaltP
0
357
Member Avatar for WhiZTiM

a small video editing Application using the core of GIMP and Audacity.... libraries that will embed GTk+ and wxWidgets... Which one will you go for?... I am fairly proefficient with Qt

Member Avatar for np complete
0
123
Member Avatar for swaggerCurioS

After I implement the following function: void List::insert(int index, const ListItemType& newItem) throw(ListIndexOutOfRangeException, ListException) { int newLength = getLength() + 1; if ((index < 1) || (index > newLength)) throw ListIndexOutOfRangeException( "ListIndexOutOfRangeException: insert index out of range"); else { try { ListNode *newPtr = new ListNode; size = newLength; newPtr->name …

Member Avatar for Ancient Dragon
0
361
Member Avatar for PinoyDev

Good day Gentl'men! Is there a way in c++ to convert a string variable that holds time of format like "17:30" to time_t variable? Lets say!: #include<iostream> #include<ctime> using namespace std; int main() { time_t timein,timeout; float timediff; string stimein,stimeout; cout<<"Enter time-in: "; cin>>stimein; cout<<"Enter time-out: "; cin>>stimeout; //convertion from …

Member Avatar for deceptikon
0
4K
Member Avatar for Geowil

At the moment I have one question about vectors but I want to leave this open ended so if I obtain more questions I can come back here. So I was looking at different containers for a player inventory that can be dynamically changed on the fly due to events …

Member Avatar for Geowil
0
252
Member Avatar for tiredoy

As I describled,I want to use the macro TRACE in conventional chracter-mode programming. When I try directly using the command TRACE(...),I encounted a mistake tips which says that TRACE ,identifier not found. So,what should I do to solve this problem?

Member Avatar for vijayan121
0
209
Member Avatar for phorce

Hello, having a weird problem and wondering if someone can help me.. Basically, I'm trying to read in a .wav file, and I have read in the header information and that's all fine, it's just the data.. Here is the code: bool Wav::readHeader(ifstream &file) { file.read(this->chunkId, 4); file.read(reinterpret_cast<char*>(&this->chunkSize), 4); file.read(this->format, …

Member Avatar for Ancient Dragon
0
233
Member Avatar for zeeshan.mustafa.3557

i want the ** Visual C++ 2010 Tutorial as i am the beginner and want to learn coding in visual C++ 2010 free.

Member Avatar for Ancient Dragon
0
225
Member Avatar for Azurea

I've read that one should use cin.get() instead of system("pause"). Why is that?

Member Avatar for WaltP
0
613
Member Avatar for 'AnKo

Hey guys, thx for the time you spent clicking here :D My question is simple enough. Let me give a basic example though: char a1[]="ok"; char a2[]="yes"; char a3[]="right"; for (int n=1;n<=3;n++;) cout << a<n>; Is there some way to make this concept work? Any help much appreciated!

Member Avatar for Ancient Dragon
0
138
Member Avatar for quiin_aien
Member Avatar for np complete
0
205
Member Avatar for phil.sutton

Ok, I am confused by this. I am doing a school project on i/o with an address database. The professor gave us a template to work with, which saved me a few minutes. The problem is I can enter information to the txt file fine. When I attempted to read …

Member Avatar for np complete
0
166
Member Avatar for Microno

A while back i wanted to develop an application that calculated the integral of any polynomial that was input but I felt it was lacking the capability to to find more complex polynomials such as: > (x^2+x)/(x^2+x^3) Unfortunately my attempts at implementing a numerator and denominator as part of the …

Member Avatar for ravenous
0
171
Member Avatar for daino

Would anyone know of a C++ report generator which can be compiled as part of a C++ Applicaiton? Is this how report generators generally work or are they largely standalone applicaitons? Thanks danny2000

Member Avatar for daino
0
156
Member Avatar for princess128

Write a C++ program that calculates and displays the yearly amount available if RM1000 is invested in a bank account for 10 years. Your program should display the amounts available for interest rates from 6 to 12%, inclusive, in 1% increments. Use a nested loop, with outer loop having a …

Member Avatar for np complete
0
172
Member Avatar for PinoyDev

Good day! I have this code that is assume to get the difference in time. Is it possible to get the difference of from a string time variable? Or, whats the best way to implement this? #include<iostream> using namespace std; int main() string timediff, timein, timeout; cout<<"Enter player time-in between …

Member Avatar for deceptikon
0
385
Member Avatar for Remzz

Hi All, I'm handling a code which is having signed decimal values(eg: -123.456)stored in a cheracter string.While performing numeric calculations on this field, need to check whether all digit is numeric.Can anyone help me. Your co-operation greatly appreciated. NB: There is strict instruction to store these values in char string.Not …

Member Avatar for Remzz
0
209
Member Avatar for adityasingh95

Here's my code: #include<stdio.h> #include<conio.h> int main(void) { int a[100][100]; /* initializing matrices to '0' */ int b[100][100]; int c[100][100]; /*matrix-c for multiplication*/ /*r1,c1 are rows and coloumns for matrix-a.r2,c2 for matrix-b.*/ int r1,c1,r2,c2; int i,j,k; clrscr(); printf("enter the no of ROWS and COLOUMNS for MATRIX-A\n"); scanf("%d %d",&r1,&c1); printf("enter the …

Member Avatar for JasonHippy
0
4K
Member Avatar for AngelOfRock

Hi, To program does anyone has a good guid to learn C + +, especially to be able to programm games later (AI). I already know the basics of Java is that usefull or have I to start from beginning? best regards

Member Avatar for np complete
-1
117
Member Avatar for emmanuell

what programming language can i use so that i make my files on a cd not to be copied?(ie.copy protect?).please help

Member Avatar for np complete
0
145
Member Avatar for didi00

My Borland C++ vresion 3.1 isn't working. It works with simpler codes, but it doesn't works with graphics and animations. Is there any settings that will make Borland work? I'm using Windows 7 but the same happened with Vista and XP also, so help? Please? Thank you all!!!

Member Avatar for gibson.elliot.5
0
248
Member Avatar for coolikedat99

I decided to get rid of windows xp and switch over to Ubuntu entirely. In order to do so I had to uninstall XP and Ubuntu so I could start over on my computer. I did this, and everything has been working better. Except for the most important part: my …

Member Avatar for np complete
0
229
Member Avatar for DaveTran

I have two classes. One main Game class and an Entity class that needs to point to the Game class so it can call its various functions # Entity.h # class Game; class Entity { public: Entity(Game *game); ~Entity(void); void Draw(float dt); void Update(float dt); protected: Game *m_game; // Missing …

Member Avatar for JasonHippy
0
406
Member Avatar for asadullah

Assumption: 32-bit Machine. Here I am going to explain How Virtual table, Virtual pointer for Virtual functions are internally working. First we have understand memory layout. Example 1: How the class's memory layout Code: cpp [code=cpp] class Test { public: int data1; int data2; int fun1(); }; int main() { …

Member Avatar for kresimir
0
3K
Member Avatar for Vish0203

hey, i've been trying to insert the element in the linked list, but I don't understand why the element is inserted at some other position i.e. it is not inserted at the position which i pass. is there any error in the insert function? template <class T> void insert ( …

Member Avatar for Vish0203
0
136
Member Avatar for Alexkid

Hi there, I’m fairly new a c++ and am having trouble figuring out how to use a returned function variable. Here’s my code #include "stdafx.h" #include <stdlib.h> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <algorithm> #include <iterator> using namespace std; std::string OMPS (char const* path) { …

Member Avatar for phorce
0
294
Member Avatar for myk45

Hi all! This is w.r.t the thread [How to make my C++ program executable on other computers](http://www.daniweb.com/software-development/cpp/threads/431194/how-to-make-my-c-program-executable-on-other-computers) I didn't want to continue the discussion there, so i created the new thread. I had faced the same problems in the past. I needed some clarification on the following: 1)`The option shown …

Member Avatar for myk45
0
300
Member Avatar for PinoyDev

Good day! I have this class for Players: #include<iostream> using namespace std; class Players { public: char Level[2]; float SetPower(); }; Players Pl, float Players::SetPower() { switch(Pl.Level) { case '1': return 5000; break; ......... } } int main() { Pl.Level='1'; cout<<"Your current Power is: "<<Pl.SetPower()<<endl; system("pause"); return 0; } Now …

Member Avatar for Vish0203
0
140
Member Avatar for rishad1418

how to edit textbox in visual c++ 2010,windows form application? please any one give me a perfect solution by details and it will be bater if you provode me tutorial link. thanks Rishad1418 [email snipped]

Member Avatar for np complete
0
55

The End.