49,761 Topics
| |
Well I have a doubt about where can I find some examples about this funcion, I need to use it on a program. Any ideas are welcome xD | |
hello everyone i am new to daniweb but not new to this field.... I love programming and have made a few games on an older version of turbo c++ which is dos based and supports VGA mode with just 16 colours.....i couldnt learn much coz i didnt had internet connection … | |
I have a device plugged into a USB port in my computer and would like to make a C++ program that controls it. I have a program that already does this, so is there a way to monitor the data that is sent to and from the device? I have … | |
I want to make sniffer in C++.So can anybody help me out by providing codes?? | |
For some reason, my numbers aren't adding in correctly and it's taking the -1 sentinel value and adding it into the total. [code=C++] // worthless testing.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using std::cout; using std::cin; using std::endl; int main() { int … | |
Hi all! Does anybody know how to generate a makefile from a visualStudio project? I kind of remember this was possible years ago, but can't find this option on the VisualStudio Express edition 2008 I am using now... I have to transfer projects from VS to eclipse and need the … | |
For instance, let's say I have two images preferably jpeg/bmp that are 128x128 - I would like the code to stitch them together so the resulting image is 256x128. I want a c++ program for it..is it possible using files in c++. | |
I have a BaseClass, which everything inherits in one way or another, and what I want to do, is whenever one of the classes that inherits this BaseClass it adds a [icode]std::vector<instanced class>[/icode] into the list of classes that BaseClass has, and whenever a class tries to add an instance … | |
I am writing a method that has to do with strings and I was stuck on how to go about coding this. Any help getting it started or tips at all would be great. Thanks. MyString::MyString(const char* s) This constructor takes a pointer to a constant C-style string as its … | |
I was looking through the source code to a game, and I came accross this line: [code=c++] static ConCommand name##_command( #name, name, description, flags ); [/code] I was wondering what all the hashes(#) do ?? | |
I want to be able to find a class with a variable in it: [code=c++] for(int i=0;i<classes.size();i++) { if(class[i].name == classes[i]) return class[i]; } [/code] I think class would be a list of classes that are instanced. where classes is a vector of strings. Is this possible? | |
Hi, I want to design a two dimensional matrix C++ class of myself. In prospect this class should implement such functions: 1. It should be able to be initialized by a binary data file(a .raw file without any header or format infomation.) with the file name as an argument of … | |
Hey I just got this book Accelerated c++ and it seems pretty good, but I'm having one problem in chapter 4. When I compile my grading program in chapter 4. I can't get the final version to work. I believe I'm supposed to enter a students name followed by grades, … | |
what do u mean by this code below? 1)vector<int> V(alpha); 2)vector<int> V(vector<int>) Whats tat declaring? Its not normal vector declaration. Plz help. Thnx | |
Hi; I want to add a string of numbers(e.g 9999) which are stored in a text file. [code] #include <conio.h> #include <stdio.h> #include <stdlib.h> void main (void) { clrscr(); char ch; int x=1; long sum=0; long integer; FILE *fptr=fopen("thousand.txt","r"); while (ch!=EOF) { ch=fgetc(fptr); ch= .....................I AM STUCK HERE.............. } fclose(fptr); … | |
I don't understand why can you do this: [code] Employee *emp; if (condition1) emp = new Employee(); else if (condition2) emp = new Manager(); [/code] but not this: [code] Employee emp; if (condition1) emp = Employee(); else if (condition2) { emp = Manager(); [/code] Maybe this is a TERRIBLE idea, … | |
Sir, i have a numerical method project. I want to be different, so i try to make a program that can read user input, ex : sin(x+3)^(x*3^x), and find the root of the equation. I already implemented Reverse Polish Notation, and also shunting-yard algorithm. But, i found out that all … | |
hello, yesterday i was learning inheritance in C++... My teacher has told me that "Inheritance means using properties(variable,function etc) of one class to another class." but when i do it with example its not working.. [CODE=C++] #include<iostream.h> #include<stdio.h> class abc { int a,b,c; public: void exp1(); }; class xyz:public abc … | |
1) This is exactly what I'm encountering. I googled for that but none of those posts talked how to do this: member function B::fb makes a call to _beginthreadex with thread function which is a member function ( A::fa ). 2) It generates error C3867: 'A::fa': function call missing argument … | |
how to compile c++ program when we r using two different functions which are defined in different file(s) under same directory in linux gcc??? | |
CString constructor or assingnment or serialization of CString causes the application crash in a multi-processor environment,(this happens in a heavily loaded condition when more than 500 threads are running) whereas it does not cause any problem in single processor environment. | |
Does anybody know how to rotate a sprite around the center of the image rather than the top left corner in Dark GDK? | |
Is there any way that I can get the sin(), cos() and tan() functions to return an angle? For example, like when you press 2nd then sin on a calculator. Or should I use different functions? | |
Hello! I'm trying to write a program, that replaces inscpitions like "\input{C:\FullFileName.txt}" to maintenance of FullFileName.txt. It now looks like [code=C++]#include <fstream> using namespace std; #define shint short unsigned int const char* InS ="input{"; ofstream log ("C:\\Users\\DimOK\\Desktop\\Lat\\TEST1\\log.txt"); bool EqN (ifstream &as, const char *ba, shint l){...} // takes l chars … | |
Dear Sir/madam, I am working on Solaris 8. dbx is showing memory access error in the following line: [code] template<class keyType_t, class dataType_t> int WrapperC<keyType_t, dataType_t>::insert(keyType_t keyVal, dataType_t& info_t ) { pair<map<keyType_t,dataType_t>::iterator,bool> retItor; retItor = subsInfoMap_obj.insert( pair<keyType_t, dataType_t>(keyVal, info_t ) ); ........ }; WrapperC class is derived from an abstract … | |
Hello Everyone, i have made programs of exceptional handling in cpp, but i am not able to run them in Turbo c, what i have to do to run them plz. explain. thanks | |
Basically I'm trying to run a simulation of neurons and this is the code that gets run in the main loop of it. [code=c++] class Neuron { private: double v, u, a, b, c, d, current, du, dv; public: double x; vector<double> pre; int id; vector<int> fired; vector<int*> post; vector<double … | |
<<snip>> Original article can be found: here: [URL="http://www.geocities.ws/jeff_louie/safearray.html"]http://www.geocities.ws/jeff_louie/safearray.html[/URL] | |
nw i hv been tryin a stuff tht m really nt sure if u guys understnd at once..bt sum1 hs to find a solution for it plzzzzzzzzzz... i need a code in C++ to do the following tasks...:- 1.) copy files from a folder 2.) save them in a different … | |
I wrote a code to get factorial for a number uptil 100. The problem i have is that i have to display the array it is sstored in a single output. So i cant use for statement and print each element. [CODE=CPP]#include<iostream> #include<cstdio> using namespace std; int main() { int … |
The End.