49,761 Topics
| |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.