49,761 Topics

Member Avatar for
Member Avatar for poncho4all

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

Member Avatar for poncho4all
0
117
Member Avatar for smarty_t2

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 …

0
60
Member Avatar for Chaosis

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 …

Member Avatar for Ancient Dragon
0
92
Member Avatar for theausum

I want to make sniffer in C++.So can anybody help me out by providing codes??

Member Avatar for suvirj
0
148
Member Avatar for Cloneminds

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 …

Member Avatar for siddhant3s
0
120
Member Avatar for oall

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 …

Member Avatar for oall
0
263
Member Avatar for nivi_14

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

Member Avatar for Salem
0
181
Member Avatar for tomtetlaw

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 …

Member Avatar for tomtetlaw
0
92
Member Avatar for lancevo3

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 …

Member Avatar for lancevo3
0
327
Member Avatar for tomtetlaw

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

Member Avatar for Salem
0
196
Member Avatar for tomtetlaw

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?

0
62
Member Avatar for nanchuangyeyu

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 …

Member Avatar for siddhant3s
0
108
Member Avatar for theashman88

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

Member Avatar for tux4life
0
241
Member Avatar for samm22

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

Member Avatar for samm22
0
85
Member Avatar for Ather14

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

Member Avatar for Ancient Dragon
0
971
Member Avatar for daviddoria

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

Member Avatar for Ancient Dragon
0
95
Member Avatar for AirGear

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 …

Member Avatar for AirGear
0
164
Member Avatar for nirav99

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 …

Member Avatar for Tom Gunn
0
135
Member Avatar for Emerald214

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 …

Member Avatar for Emerald214
0
200
Member Avatar for csayantan

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

Member Avatar for Tom Gunn
0
186
Member Avatar for jebinaelsie

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.

Member Avatar for u8sand
0
127
Member Avatar for chrishtones

Does anybody know how to rotate a sprite around the center of the image rather than the top left corner in Dark GDK?

Member Avatar for William Hemsworth
0
102
Member Avatar for chrishtones

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?

Member Avatar for tux4life
-1
182
Member Avatar for DimOK

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 …

Member Avatar for DimOK
1
263
Member Avatar for shamiliroy

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 …

Member Avatar for tux4life
0
96
Member Avatar for lakshay

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

Member Avatar for shadwickman
0
85
Member Avatar for OffbeatPatriot

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 …

Member Avatar for OffbeatPatriot
0
604
Member Avatar for meabed

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

Member Avatar for JeffLouie
0
418
Member Avatar for Himani_29

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 …

Member Avatar for Himani_29
0
206
Member Avatar for catchmrbharath

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 …

Member Avatar for siddhant3s
0
100

The End.