49,756 Topics

Member Avatar for
Member Avatar for logan_231_2009

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, …

Member Avatar for user786
0
3K
Member Avatar for Zvjezdan23

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. …

Member Avatar for mrnutty
0
159
Member Avatar for bigdan182

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; …

Member Avatar for NathanOliver
0
190
Member Avatar for king5201

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 …

Member Avatar for Salem
0
145
Member Avatar for salah_saleh

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 …

Member Avatar for salah_saleh
0
103
Member Avatar for Ahmed2

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 …

Member Avatar for Ahmed2
0
170
Member Avatar for shweta2008

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.

Member Avatar for shweta2008
0
145
Member Avatar for dilequeno

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 …

Member Avatar for m4ster_r0shi
0
138
Member Avatar for dilequeno

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.

Member Avatar for Salem
0
425
Member Avatar for itgrowsind

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 …

Member Avatar for itgrowsind
0
118
Member Avatar for triumphost

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 …

Member Avatar for Tellalca
0
145
Member Avatar for dilequeno

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; …

Member Avatar for dilequeno
0
154
Member Avatar for tiredoy

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

Member Avatar for m4ster_r0shi
0
174
Member Avatar for Blacksheepjnr

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 …

Member Avatar for Tellalca
0
107
Member Avatar for riotburn

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 …

Member Avatar for Tellalca
0
226
Member Avatar for dilequeno

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> …

Member Avatar for dilequeno
0
99
Member Avatar for alwaysLearning0

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!!.

Member Avatar for mike_2000_17
1
158
Member Avatar for pseudorandom21

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 …

Member Avatar for GreenDay2001
0
101
Member Avatar for Sonia11

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 { …

Member Avatar for L7Sqr
0
4K
Member Avatar for awah mohamad

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 …

Member Avatar for awah mohamad
0
699
Member Avatar for riotburn

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 …

Member Avatar for mike_2000_17
0
183
Member Avatar for sergent

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 …

Member Avatar for sergent
1
248
Member Avatar for bigdan182

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 …

Member Avatar for bigdan182
0
156
Member Avatar for Chona Ramos

using c++ program,enter students record and perform the following activity: save search delete view edit print

Member Avatar for WaltP
0
163
Member Avatar for mike_2000_17

[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 …

17
2K
Member Avatar for Sonia11

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. …

Member Avatar for TrustyTony
0
120
Member Avatar for thecoolman5

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

Member Avatar for mike_2000_17
0
325
Member Avatar for triumphost

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 …

Member Avatar for Ancient Dragon
0
546
Member Avatar for bratok

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 …

Member Avatar for bratok
0
242
Member Avatar for tiredoy

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 …

Member Avatar for tiredoy
0
228

The End.