51,593 Topics

Member Avatar for
Member Avatar for bluerosebuddha

Hello, Can someone break down what this array loop means exactly? Mathematically I can't make any sense of it. I've reread this section of my book multiple times, but it's not sinking in. [code] int alpha[a]; int j; for(j = 0; j< 5; j++) { alpha[j] = 2 * j; …

Member Avatar for M.FARAG
0
149
Member Avatar for endframe

Hello all, like always : D I'm working on a structure program that has an array [B](m)[/B] that asks the user to enter its values, and then it transfers the even numbers to an array [B](even)[/B] and the odd to another [B](odd)[/B]. Both[B] (evan)[/B] and [B](odd) [/B]arays are in a …

Member Avatar for endframe
0
118
Member Avatar for aditya.kaole

Hi, Need some help regarding the macro usage. I've a case where the parameter to be passed to the macro function is not known till the point it is called. example: (continuing the example quoted below) - number "12" passed to the " DEFINE_FUNC( n )" macro is determined at …

Member Avatar for Salem
0
94
Member Avatar for theonlywalks

Hey everyone, I have a simple simple problem that is literally driving me insane. Basically, I have a database of numbers seperated my spaces. I just took a segment of my code because I am soooo completely lost with the output!! If the database is: 1 2 3 9 7 …

Member Avatar for Dave Sinkula
0
133
Member Avatar for tom384

Hi guys, I'm having trouble using a pointer to a vector<float>, it doesn't seems to be responding as I'm expecting it to. Probably a silly mistake on my behalf, but would anyone kindly point it out please. [code] vector<float>* t_matrix; ... cout << "get_t_matrices 0: " << Character::anim.get_animations()[j].get_t_matrices()[0].size() << endl; …

Member Avatar for mattjbond
0
197
Member Avatar for jakesee

Hi, May I ask what is the correct syntax to achieve the following function pointer pattern? I keep getting error C2064: term does not evaluate to a function taking 0 arguments Thank you. [CODE] class Apple { public: Apple(int i) { if(i == 1) { juicer = &Apple::one; } else …

Member Avatar for mattjbond
0
149
Member Avatar for Index

Hi! I would like to split vector elements into the two vectors. One output vector shall contain elements that, for instance, are odd, and another output vector shall contain even elements (actually the case is more complicated;). I wrote something like this: [CODE] typedef vector<int> ItemVec; static bool isOdd(const int …

Member Avatar for Index
0
2K
Member Avatar for mischikun

I'm having a bit of a problem with a group project. We're supposed to use linked lists in it and I've already created classes for the nodes for the linked lists. The only problem is that I need to make the class point to itself but I'm not sure how …

Member Avatar for Murtan
0
183
Member Avatar for dilas

I have such a problem: when I write:[code=c++] template<bool b> void foo(void); template<bool b> class B { friend void foo<b>(void); }; template<bool b> void foo(void){}; [/code] everything works just fine. But when I incapsulate all this in another class, I receive errors: [code=c++] struct C { template<bool b> void foo(void); …

Member Avatar for dilas
1
165
Member Avatar for EricDLundquist

Currently I'm using the way posted below which works but it sure isn't elegant. Can anyone think of a way to test if the UI has loaded without using system() or popen() in c++ [CODE]FILE * fp; char inputArray[100]; fp = popen("ps aux | grep SystemUIServer | grep Library | …

0
54
Member Avatar for HelloMe

Hello everyone... I have 2 questions and it would be great if you guys can help me on these. I wrote a factorial program and it works already. The problem is when it comes to higher outputs. For example: 11 P 5 = 55440 // this works so far but …

Member Avatar for MyrtleTurtle
0
84
Member Avatar for savvas15

hey guys! i am new to c++ and i need help with the following code. we are suppose to write a program and check if a word is palindrome or not. [CODE]#include <iostream> using namespace std; int IsPalindrome(int []); void main() { char word[25]; cout <<" Enter a word: "; …

Member Avatar for savvas15
0
98
Member Avatar for sssouljah

Hello i was wondering how to store a tridiagonal matrix in c++ i know i have to use three arrays for the upper lower and diagonal terms, but how do i then use parenthesis operator to access single elements of the matrix when it is stored as three separate arrays....also …

Member Avatar for jonsca
0
205
Member Avatar for Deey

Greetings. i have a program which dynamically creates panels and stores them into a panel array. each panel has added mouse click action event. what i need to know is how to determine on which panel i have clicked on? thanks.

Member Avatar for Geekitygeek
0
102
Member Avatar for tyke17

hello, i am new to vc++, can i write and run c program in vc++? if yes, please explain how to do so.

Member Avatar for strmstn
0
97
Member Avatar for HealBrains

Hey guys, I have a quick question: When I call [INLINECODE]DWORD dw = pMesh->GetFVF();[/INLINECODE], how do I determine what flags the DWORD represents? For example, if I call that function and [INLINECODE]dw == 18[/INLINECODE], how do I determine which FVF values the '18' represents? Thanks for your time! EDIT: I …

0
77
Member Avatar for kip2johnny

I would to get assistance on a problem involving binary search trees.writting a search algorithm and a pseudocode of a 5 node binary search tree

0
35
Member Avatar for marshella

i need help with my assignment...i'm so new with this c++ programming...i only know how to do up to division only for this question... and for question two,i really have no idea how to start...can someone help me out and try to make me understand how the code will works...i …

Member Avatar for WaltP
0
184
Member Avatar for m26k9

Hello, I did search around and there are few examples about this situation (not much as I would have expected though), but I want to know the procedure or how to find the solution. Basically I have a 32-bit UNSIGNED register. I want to know how to calculate the value …

Member Avatar for m26k9
0
82
Member Avatar for empror9

Hello guys, i would like to ask you about c++ language. have an assignment and i want to do a movement for? i another questions, the hero should for example take a bomb to destroy the wall , hoe can i disply a message to show the user that what …

Member Avatar for empror9
0
159
Member Avatar for easyb

Hi techies, I am new into C++. I like to write a program that generates all the primes number between 1 and 100. Below is the code I have written but brings no output. Thanks for any help... [CODE]//A program that generates all of the prime numbers between 1 and …

Member Avatar for easyb
0
200
Member Avatar for fallendream

hey, to start with heres the backdrop; me and a friend from school have a year to create a fully working web browser and for this i think C++ would be best. heres where i need help, i have no experience with C++ and i need to learn it from …

Member Avatar for jadkins
0
571
Member Avatar for squarey

Hi Guys Does anyone know of any classes that process string mathmatical equations ? E.g. 2+2(6*5(2-1)) - It is specified on the command line and stored as a string.

Member Avatar for lotrsimp12345
0
91
Member Avatar for aruprongs

Hi, I'm reading from a text file and writing to another one.My problem is that the data is being written to the new file as one line..i.e., when the end of a line is reached it does not start writing a new line but continues on the same line.. Can …

Member Avatar for lotrsimp12345
0
75
Member Avatar for macman101

Hey guys, I need a little help. I'm writing a palindrome checker for fun, and I need to ignore/delete spaces and punctuation. I compare my two strings using strcmp and I use pointers to go through the first part of the program. I'm now stuck trying to factor out the …

Member Avatar for lotrsimp12345
0
165
Member Avatar for GSPprog

I am trying to get a program that gets a list from a txt files outputs it. then inserts a node into the list and the list grows dynamically. Everytime I insert into the list the list is filled with the same values following the insertion point. For this example …

Member Avatar for GSPprog
0
270
Member Avatar for libby71

This is a non technical question, I am not a programmer, but I have a question on creating a C++ program, I hope somone could answer for me, and to see if this could be done in C++, so I could hire someone to make this for me. I am …

Member Avatar for jonsca
0
94
Member Avatar for vbx_wx

[CODE] sendfile(string path) { int length; char buffer[10]; ifstream in(path.c_str() , ios::binary); in.seekg(0 , ios::end); length = in.tellg(); in.seekg(0 , ios::beg); stringstream infofile; string name = splitname(path); infofile <<"info" << " " << name << " " << length; string infoBuffer = infofile.str(); send(infoBuffer); while(!in.read(buffer , 1).eof()) { cout <<::send(sock …

Member Avatar for gashtio
0
125
Member Avatar for tango2009

I am trying to make an istance of this Vector2f(20,20) How to I go about this?

Member Avatar for tango2009
0
106
Member Avatar for sonalsinha
Member Avatar for tkud
-2
33
Member Avatar for donaldw

Hi all. I'm having some problems creating a dialog in VC++ 6.0. I am working in the dialog resource view. I have five groups of radio buttons, each of which is in it's own group box. Two of the five groups are behaving normally (i.e. mutually exclusive within it's own …

Member Avatar for Geoff_Giraffe
0
209
Member Avatar for nerdy900

I was working on the being of a cash register and I was testing this portion of my code. It compiles, but when I input my first items name I get a windows error and the program ends. I would appreciate any help an/or explanation. [CODE]#include <iostream> // allows output …

Member Avatar for nerdy900
0
114
Member Avatar for dolly_olaide

Hello, I have a software-based project of using human recognition algorithm to detect an intruder and be able to differentiate if the intruder is human or non-human. Any ideas on what recognition algorithms I could use?:) Thanks!

Member Avatar for dolly_olaide
0
169
Member Avatar for lotrsimp12345

I got the files to build but with this link [url]http://www.site.uottawa.ca/~laganier/tutorial/opencv+directshow/cvision.htm[/url] the include files in step 2 don't show up anywhere. Help appreciated.

Member Avatar for lotrsimp12345
0
80
Member Avatar for wwsoft

hello , I am making a small game engine and I have 2 header files engine.h and objects.h they both include each other. However it seems that its not getting included into objects.h , what is the "right" way to fix this ? sorry , I'm too lazy to gut …

Member Avatar for wwsoft
0
140
Member Avatar for Vou

Hello everyone, I'm currently in college for Game programming and I'm coming in having known nothing about programming at all. I'm currently learning Object Orientated C++ Programming. I have been at this one problem for two weeks and I'm completely stumped. I currently have three files the main cpp file, …

Member Avatar for Lerner
0
157
Member Avatar for yanni13

Hi, I've got two programs (client and server) using sockets. The program are working fine if I set the client IP to local host (127.0.0.1) or the LAN IP (192.168.0.3), but can't connect if the IP is set to external Internet IP (92.24.xxx.xxx). Anyone have an ideea, please? Thanks!

Member Avatar for yanni13
-1
290
Member Avatar for jeevsmyd

I have been doing TC++ programing for the last 2 years.. This evening all of a sudden I made the switch to vc++.. here is the code.. my first ever Visual C++ programme.. it is compiling without errors but the console window poped and disappeared quickly.. what is wrong? something …

Member Avatar for WaltP
0
89
Member Avatar for eddan

[CODE]// Calculator.cpp : Defines the entry point for the console application. // #include <iostream> #include <cstdlib> using namespace std; int GetNumber1(); void GetMathematicalOperation(); int GetNumber2(); int CalculateResult(); int PrintResult(); int main() { GetNumber1(); GetMathematicalOperation(); GetNumber2(); CalculateResult(); PrintResult(); int CalculateResult( int x, char chOperation, int y); int PrintResult( CalculateResult( int x, …

Member Avatar for mitrmkar
0
148
Member Avatar for Violet_82

Hi guys, I am having problems with a simple program I wrote, here's the source code: [CODE]//seventh #include <iostream> using std::cout; using std::cin; using std::endl; class Maths { public: void enterInstructions( int instructions ) { cout <<"I want to do a: \nAddition\nSubtraction\nType your choice here: "<< instructions << endl; } …

Member Avatar for jonsca
0
157
Member Avatar for safia qurban

i want to give a presention on functions use in code and want to give a comparision by function call by value and by reference with different cods can any one help me ,as give me these codes?

Member Avatar for Ancient Dragon
0
276
Member Avatar for johnnybgoode
Member Avatar for vegaseat
0
767
Member Avatar for parisa_bala

I am a C programmer. I am working on a C++ code and translating it into C. I got stuck in a point where I do not understand what is going on. I would kindly ask if you would mine help me to understand these problems. I have three problems: …

Member Avatar for Narue
0
205
Member Avatar for MrPapas1991
Member Avatar for eddan

Hello!! I have started learning c++ and it has been a real sucess until now. My codes that worked before and those that im trying to use now, doesn't work.. I get a compiler error... Here is the code and the error: // tutorialearning.cpp : Defines the entry point for …

Member Avatar for gangsta1903
0
900
Member Avatar for lamphan

I have debugged and dec2bin function outputs "bin" value is right, but cout function somehow prints out wrong value. How to fix it? Thanks! [CODE] #include <iostream> #define bit 5 void dec2bin (int, int *); int main (void) { int bin[bit]; int num = 24; // example dec2bin(num, bin); for …

Member Avatar for Nick Evan
0
154
Member Avatar for bhp2005

Hi, I have this homework problem that I need some help on: In 3D: Given 2 links attached end to end with lengths L0 and L1 respectively, a point P0 that the first link starts at, and a point P1 that you want the end of the 2nd link to …

Member Avatar for jonsca
0
162
Member Avatar for Stefano Mtangoo

Hi guys, I have two bushes to clear up. I have doe SQL fro some time now but I have never done blob. I think the next project will require it. So here are my Question: 1. How blob differ from any other type like text? 2. How to create …

Member Avatar for Stefano Mtangoo
0
122
Member Avatar for MyRedz

help i need to search and delete a node from a link list but i am not sure of the algorithm can someone please help me with the algorithm and concept need example thanks..

Member Avatar for lotrsimp12345
0
112
Member Avatar for C++new

This code is a tutorial, from internet, I can make it to compile, error to advance for me, (+) use is a ???? for me, using MV C++. Is a class tutorial..... [code] #include<iostream> #include<iomanip> #include<string> using namespace std; class Food { private: //instance variable.Every object wiil have this variables..... …

Member Avatar for lotrsimp12345
0
152

The End.