49,761 Topics

Member Avatar for
Member Avatar for radiata

Hello, I'm supposed to write a programming project that reads 2 files and then organizes the numbers into an output file in order from smallest to largest. The input files are as they appear: 1 4 5 and also 2 3 6 Right now I'm having trouble with the output …

Member Avatar for WaltP
0
121
Member Avatar for Xoltha

Hi, I have a problem with L-systems recursion, I tried a lot of ways to figure out how to make my fuction recure but I have no luck at all. What the program must do is the Koch system or rather the replacement rule, where by everytime the fuction recurs, …

Member Avatar for teo236
0
173
Member Avatar for dilequeno

I am trying to create a very large 3D array. I am currently using a psuedo-3D array with a 1D array. Here is what I have so far: [CODE]#include "stdafx.h" #include <iostream> #include <iomanip> #include <fstream> #include <istream> #include <string> #include <vector> #include <numeric> using namespace std; const int depth …

Member Avatar for Greywolf333
-1
196
Member Avatar for toneranger

I'm reading a big csv file into a data structure defined as such: [CODE]struct PriceInfo { double Open; double High; double Low; double Close; unsigned int Volume; unsigned int Time; std::string Date; };[/CODE] So somewhere in my main function, I have this line: // read contents of datafile by overloading …

Member Avatar for danb737
0
590
Member Avatar for awah mohamad

hey guys i am planning to program a website and a software that connects to the website and get information from the website..the web part is easy and i made it but for the program, is c++ good for such a program?? and if yes, which library do i need …

Member Avatar for Awah Mohamed
0
144
Member Avatar for LevyDee

I am confused! [code] void AnimationEngine::AddAnimationSet(Animation* animations) { AnimationSet* newSet = new AnimationSet(); for(int i = 0; i < (sizeof(animations) / sizeof(Animation)); i++) { for(int n = 0; n < animations[i].AnimationConditions.size(); n++) { //newSet->conditions is of type std::vector<std::vector<myType>> //animations[i].AnimationConditions is of type std::vector<myType> newSet->conditions[i] = animations[i].AnimationConditions; } } //Stuff unrelated …

Member Avatar for mrnutty
0
165
Member Avatar for dylank

Hi, I have asked StackOverflow, compared my code to multiple different online sources, but I still cannot get the page status from the server. The library I am using is Wininet, and the function failing to retrieve the correct data is HttpQueryInfo. I am linking against wininet. Code: [CODE] int …

Member Avatar for dylank
0
317
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
160
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
146
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
104
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
140
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
426
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
155
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
184
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
110
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
228
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
159
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
702
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
263
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

The End.