49,761 Topics
| |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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? | |
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, … | |
i want the ** Visual C++ 2010 Tutorial as i am the beginner and want to learn coding in visual C++ 2010 free. | |
I've read that one should use cin.get() instead of system("pause"). Why is that? | |
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! | |
How to get the **Sine** and **Cosine** of an **inputed** number by the user? | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
what programming language can i use so that i make my files on a cd not to be copied?(ie.copy protect?).please help | |
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!!! | |
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 … | |
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 … | |
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() { … | |
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 ( … | |
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) { … | |
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 … | |
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 … | |
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] |
The End.