49,756 Topics
| |
Hello everyone, congratulations for the good job. The last 5 days i search for a comprehensible and simple, CPM algorithm and i can't find one. I want to make a program (in C++) that it will calculate the critical path of a given number of nodes..Any ideas? thanks for reading, … | |
I need help with my distance formula. pow is apparently not in cmath or math.h. Since I am a beginner in C++, I need some help with the distance. I did the floaters and everything, well I used a book. Beginning Math and Physics for Game Programmers by Wendy Stahler. … | |
Hi I am writing a football tournament sim and cannot get the main of my program to deal with the structures which are defined in the header. Here is the relevent code: header file [CODE] #include <math.h> #include <iostream> #include <array> #include <string> using namespace std; struct team{ string name; … | |
How can i display the pcm wavform by using BCB. Just like "Gold Wave" and "CoolEdit". I have tried to use Tchart and some other vcl components but they store data in memory. So when displaying huge data, the system will run out of memory. I don'n know how to … | |
hey! I have some questions regarding exceptions. concerning this code: [CODE]try 15 { 16 cout << " Function throwException throws an exception\n"; 17 throw exception(); // generate exception 18 } // end try 19 catch ( exception & ) // handle exception 20 { 21 cout << " Exception handled … | |
Hi there, I'm currently working on a small broject which is about providing flexible download service. Basically, I read the info from a csv file and put it in the futurelist, then depending on the length of the file I will put it either in currentlist or delayedlist and after … | |
How to print ascii values from 0 to 255 in C++ ? i have seen many programs regarding this but didnt understand them ...so plz give expalnation also. | |
I am trying to create a 3D vector and then populate it with values. Firstly I want to create a 3D vector of size 100 with all initial values set to zero. I know that to do this in the 1D case the code would read as follows: [CODE]vector<float> vec … | |
I'm not really sure what the correct way to initialize a 3d array is. [CODE]float array3D[100][100][100] = {0};[/CODE] Is this correct? When I try to compile I get problems. | |
Im trying to write a program that will get 10 different houses information about those houses will be price square feet and rooms. I have to use an infile about the information and then have it sort by selection or bubble sort also use a header file, can anyone help … | |
Normal buttons look Rectangular and I was trying to figure out how to round the edges of it and found myself with a headache.. How do those pro designers do it? How do they get the custom GUI's and the buttons rounded or even custom buttons in any shape? Kind … | |
I am having problems using the accumulate to find the sum of all elements in a vector. Here is what I have: [CODE]#include "stdafx.h" #include <iostream> #include <iomanip> #include <fstream> #include <istream> #include <string> #include <vector> #include <numeric> using namespace std; int main() { vector<float> energy; for(int i = 0; … | |
Hey,guys I want to print a word in the center of a CMD's window If I can get the size of it,I could calculate the position where I put the word. Anybody who can help me? Much Thanks | |
Hi I want to know : 1 how to add a persons name to the end of a dynamic array? 2 how to check if the array is full, and if so to print a constant string? 3 how to search in a dynamic array for a specific name and … | |
I've made a shape base class along with a bunch of derived classes. I have an object array of derived objects and a loop to do the function but am getting this error: error LNK2001: unresolved external symbol "public: virtual void __thiscall Shape::drawObject(void)" (?drawObject@Shape@@UAEXXZ) Thought it might be a problem … | |
Here is what I have so far: [CODE]#include "stdafx.h" #include <iostream> #include <iomanip> #include <fstream> #include <istream> #include <string> #include <vector> using namespace std; class dm_energy_vec { public: vector<float> m_energy_dep; }; int main() { const int phantom_size = 50; int energy_index; vector<float> xpos; vector<float> energy; vector<float> energy_dep (0, phantom_size); vector<dm_energy_vec> … | |
Mike_2000_17 and Narue Just a thought: You should write a beginner's tutorial on C++0x for Daniweb. That will be a great way to promote this site. I can also contribute on some easier topics!!. | |
I recently stumbled upon a boost installer (which I think is awesome), here [url]http://www.boostpro.com/download/[/url] and I was wondering if there is anything similar for QT and Visual Studio 2010? On the QT Website I found this page, but no VS2010 installer. Will the 2008 one work ? [url]http://qt.nokia.com/downloads[/url] I suppose … | |
Hi guys, I am stuck in one of my code to count the number of occurrence of each element in an array. Can someone please nudge me towards where I am going wrong. [CODE]for(int i=0;i<r;i++){ for(int j=0;j<r;j++){ if(store[i]==store[j])//array where I need to count the no. of occurrence of elements { … | |
hey guys.. i have problem compiling this code.. i am new to c++ by the way. this is my code. [CODE]// Project.cpp : Defines the entry point for the console application. // Doodle Program #include"stdafx.h" #include<iostream> #include<conio.h> #include<random> using namespace std; int main(){ randomize(); cout<<"Doodler! Press I/J/K/M to move, Q … | |
I have a shape class with each shape having a coordinate for where its located. I have overloaded the - operator to calculate distance but it doesnt return the correct value. Any clues? [CODE]//Main file with figure pointer to the derived class functions #include <iostream> #include "shape.h" #include "rectangle.h" #include … | |
Hello, I am making a program that will draw a ramps for a bike game. It does that by making many lines which form a ramp or other figures. For one of the ramps I have a small problem. In the game if something is too smooth, it will slip … | |
I keep getting this error while trying to make my football tournament simulator, anyone know how I can solve it? or even just what it means! ------ Build started: Project: world cup sim, Configuration: Debug Win32 ------ main.obj : error LNK2019: unresolved external symbol "void __cdecl teamstructure(void)" (?teamstructure@@YAXXZ) referenced in … | |
using c++ program,enter students record and perform the following activity: save search delete view edit print | |
[B]Beginner's Guide to C++0x: The Big Five - Implementing a Resource-holding RAII Class[/B] This tutorial will show how to implement a [I]resource-holding class[/I] showing practical use of [I]C++0x features[/I]. A resource-holding class is any class which holds, with its data members, a resource which could include: [LIST] [*]dynamically allocated memory … | |
Hey guys, I want to know one thing, for instance I am having a character array like this: [@@123124123123125@@@] where 123, 124 and 125 are one three-digit numbers and are NOT separate like 1,2 and 3. I want to know the number of times 123, 124 and 125 have occurred. … | |
hi, i am just wondering how to open a picture of a normal format. I know that you cant do it in the console. And i am using the compiler DEV-C++. Thanks | |
Not sure why this moderator or admin or whatever deleted my previous thread because it wasn't anything malicious.. My problem is that getfileattribute doesn't work for me.. and my code below is just a snippet of my entire program which is below that.. Dear Mod: I think you deleted it … | |
Hi All, I have a simple question, I hope. Here's the overview of the problem: "There is a board game with 9 squares on it (three rows of 3 squares). Each square has a coin on it. The coins can be either heads or tails side up. You can only … | |
Well, I define a function gotoxy(). [CODE]void gotoxy(int x, int y) //定位到第y行的第x列 { HANDLE hOutput; COORD loc; loc.X = x; loc.Y=y; hOutput = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(hOutput, loc); return; }[/CODE] However,whenever I use it.There is a flashing cursor which is ugly to see. I want to get rid of it.But I don't … |
The End.