49,761 Topics

Member Avatar for
Member Avatar for sodha125

Write a program to move a character around on the screen in response to user key-presses (you’ll have to decide which keys to use for up, down, left and right - combinations like t b f and h work well: or if you’re more ambitious you could find out the …

Member Avatar for Labdabeta
0
127
Member Avatar for Captain Neo

#include<iostream.h> #include<conio.h> #include<math.h> void main() { clrscr(); int n,x,i,j; float p,fact=1.0,sum=0.0; cout<<"\n\tEnter the number: "; cin>>n; cout<<"\n\n\tEnter the Value of 'x': "; cin>>x; for(i=1;i<=n;i++) { for(j=(2*j-1);j>0;j--) { fact=j*fact; if(i%20==0) p=(-1)*pow(x,(2*i-1)); else p=pow(x,(2*i-1)); sum+=p/fact; } } cout<<"\n\tThe sum is "<<sum; getch(); }

Member Avatar for PrimePackster
0
178
Member Avatar for Zssffssz

In my program (not the compiler) how would I implement a 'tag' system, for example : dpkg [B]-i[/B] hello I am not skilled enough to go through gcc's or dpkg's sources so sone help would be nice.

Member Avatar for rubberman
0
71
Member Avatar for Dman01

Hi. I want to read through a file and search for variables saved in it. However if the stream reads the last char I got errors like EOF. For example the following code would not work as intended to : [CODE] bool BaseFileReader::Valid() const { if (!File.is_open()) std::cout << "\n\nERROR: …

Member Avatar for Dman01
0
250
Member Avatar for yinyue

I have run this code below but it have a few error..hope someone could help me to solve this problem..tq..:) #include <stdio.h> #include <string.h> #include "cv.h" #include "cvaux.h" #include "highgui.h" int nTrainFaces=0; int nEigens=0; IplImage ** faceImgArr =0; CvMat * personNumTruthMat =0; IplImage * pAvgTrainImg = 0; IplImage ** eigenVector …

Member Avatar for yinyue
0
463
Member Avatar for mustad104

I try to implement ford fulkerson algorithm but i have problems at my_alg function.I think the reason for this problem is find_edge function.since when i find the edge and increment its flow(asker_sayisi),at the next line it seems to be incremented but at the next line when i find the same …

Member Avatar for Clinton Portis
0
729
Member Avatar for HacruLeian

hello, i want to get some guidance from the reader who read my post. I'm doing a game called deal or no deal using c++ and i can't think of other way to print the box's number instead of printing the value inside. what i want to do is, user …

Member Avatar for LRRR
0
2K
Member Avatar for guccimane

[CODE]#include <iostream> #include <string> using namespace std; class shapes { protected: int width; int height; public: shapes() { width=0; height=0; } ~shapes() { } void getWidth() { cout<<"What is the width"<<endl; cin>>width; } void getHeight() { cout<<"What is the height"<<endl; cin>>height; } }; class rectangle:public shapes { public: void area() …

Member Avatar for LRRR
0
101
Member Avatar for jigarsangoi

i want to create dc++ hub using dynamic ip , because my ip is updated automatically after some period of time. I am using DSL(PPPoE) connection. If it is possible to make dc++ hub using dynamic ip then i want full instruction & help so that i can follow to …

0
72
Member Avatar for myk45

Hello everyone, I came across the following in a book: [CODE]Keyword typename The keyword typename was introduced to specify that the identifier that follows is a type. Consider the following example: template <class T> Class MyClass { typename T:: SubType * ptr; ... }; Here, typename is used to clarify …

Member Avatar for myk45
0
97
Member Avatar for ChrisMackle

I found a good tutorial and added a few things to it such as text on screen using the TTF dll, the code worked fine before setting up the font and attempting to display it. I still get no errors or warnings it just compiles then closes instantly :(, no …

Member Avatar for ChrisMackle
0
107
Member Avatar for triumphost

How do interpreters do it? I've seen bots for games that encrypt files then decrypt them at runtime and run what's in them.. Well How? How can I do this in C++? I plan to do this in another language but I decided to ask in C++ section because this …

Member Avatar for VernonDozier
0
164
Member Avatar for reallyslick

I've got a linklist class and would like to have the ability to create a new node that can instantiate it's own new linklist. (some what of a multidimensional link list) I've tried the line: linklist *self = this; but my program crashes when i exit. any thoughts?

Member Avatar for reallyslick
0
138
Member Avatar for Karlwakim

Hi everybody, I have a crazy problem with a basic calculator. [CODE]#include <iostream> using namespace std; main (){ int num; int y; int ans; cin >> num; for (int x = 0;x < num;++x){ cin >> y; ans += y; cout << ans << endl; } } [/CODE] it take …

Member Avatar for Karlwakim
0
131
Member Avatar for tomtetlaw

Is there any reason you would want to write your own RTTI system for use in your code, when there already is one in C++?

Member Avatar for mike_2000_17
0
536
Member Avatar for krehman143

HI, dears, Can any 1 help me in writing the following program.. i cant do it. so can any1 help me. > Write C++ program that calculates the following Total Runs Total Balls 6s 4s 3s 2s 1s 0s S/R Avg m waiting fr this. This Program is About Cricket …

Member Avatar for PrimePackster
-2
161
Member Avatar for stevanity

I wanna know what type of parser is used in the gcc and turbo c++ compilers. whether a top-down or bottom-up parser is used..... ?

Member Avatar for stevanity
0
858
Member Avatar for hamby

Hi guys, I'm writing a weasel program and needed a random character generator, I used a random number generator to give an ascii code for each character, and made a sequence of them, then I realized I needed to include the "space" symbol, but upon inclusion of the new code …

Member Avatar for hamby
0
187
Member Avatar for KingAudio

I am in an 11th grade computer science class learning C++ and I feel that the class is going to end before I learn how to apply C++. What I want to know is what do I need to learn to start applying C++ into tasks like software development, game …

Member Avatar for VernonDozier
0
435
Member Avatar for khajvah

Hello people I heard, that c++ is more powerful than c and i want to learn one of them. I want to know if it is better idea to start with C or with C++ without learning C. I know a bit of C# (i can make some basic games …

Member Avatar for zeroliken
0
252
Member Avatar for KingAudio

Hello. I need some help with variable types. I am currently an 11th grader taking my first Computer science class. I am learning C++ and I would like to know how I can make 10/3 3.33 rather than 3 in C++. For example, a member on the forums updated my …

Member Avatar for richieking
0
132
Member Avatar for daviddoria

I read that using a policy class for a function that will be called in a tight loop is much faster than using a polymorphic function. However, I setup this demo and the timing indicates that it is exactly the opposite!? The policy version takes between 2-3x longer than the …

Member Avatar for mike_2000_17
0
81
Member Avatar for Raymond10

Hello, and happy new year first of all. What I am trying to do is make a program that according to the values the user inputs then displays a polynomial. The forumla for the polynomial is this: [code]float par(float x) //H timh ths synarthshs sto shmeio Xo { float tel=trap[0][1], …

Member Avatar for Raymond10
1
133
Member Avatar for Karlwakim

hi everybody, the double type is 8B, right ? So if i use this code : [CODE]double pear[500000000];[/CODE] it will use 4GB of Ram ? or there's a limit for arrays ? thanks

Member Avatar for LRRR
0
79
Member Avatar for daviddoria

I have a feeling that I can come up with a much better title for this thread once I know the answer to this question :). Say I have a function template template <typename T> void MyFunction(). Now I want to specialize MyFunction for a templated type. That is, say …

Member Avatar for daviddoria
0
168
Member Avatar for stereomatching

I don't know should I post this article at here or not, if you think this should belongs to other area, please move it to there. I need to design some domain specific language to generate some C++ source codes. I have considered about using xml directly instead of designing …

Member Avatar for stereomatching
0
145
Member Avatar for PoovenM

Greetings! I have a C# dll generated from a .resx file (I believe it's called a satellite dll). This stores simple key to string mappings (used for language localization). I was wondering if it's possible and feasible to access the information stored in the C# dll from a C++ unmanaged …

Member Avatar for PoovenM
0
937
Member Avatar for PoovenM

Hi there, I'm trying to access a resource only dll (compiled with the [i]/NOENTRY[/i] linker option) within C#. The dll file was created using a rc file that contains a [b]STRINGTABLE[/b]. I used [b]CComBSTR[/b] to load the string resource from the dll in C++; I'm not sure how to do …

Member Avatar for thines01
0
188
Member Avatar for ahoysailor

Hi all, I've been trying to find part of a string in a vector. The problem being that I can only get it to work if I enter the entire string, but I need it so that I only search for the first part of the string in the vector. …

Member Avatar for Clinton Portis
0
176
Member Avatar for srinivas88

I am trying to implement process pairs redundancy (process level redundancy) in c/c++. basically there is a active core process 1 running on one system and its standby copy, process 2, is running on other system. When ever the active one goes down the standby becomes active and executes the …

Member Avatar for L7Sqr
0
667

The End.