51,593 Topics

Member Avatar for
Member Avatar for M.FARAG

I have downloaded a library from this site that deals with Matrix and Complex........Does it do this correctly??? [URL="http://www.zenautics.com/matrixdoc/index.html"]http://www.zenautics.com/matrixdoc/index.html[/URL] if so I want to use this library to get the inverse matrix of of a matrix consists of a complex elements how can I do this??? If it is a …

Member Avatar for WaltP
0
112
Member Avatar for kratosaurion

Hi guys and gals, 1st post here! Woot! With that out of the way, I need some help with this steaming fresh BJ program. I need to write functions for the yes deal and no deal options, but the player total seems to get messed up somehow and when a …

Member Avatar for Lerner
1
81
Member Avatar for crozbme

I am trying to count the characters in a linked list. I am receiving a compiler error when this function is tested... **invalid types `char[int]' for array subscript ** [CODE]int slist::count_c(char c) const { slistelem* temp = h; int count = 0; for (int i = 0; i != '\0'; …

Member Avatar for Ancient Dragon
0
126
Member Avatar for icelantic

I am working on an assignment which is a container class that uses an array to hold strings. We must use dynamic memory, and can only use cstring class functions, no objects can be strings. So we must use char arrays. Anyways my problem is that whenever i run my …

Member Avatar for StuXYZ
0
118
Member Avatar for Nicky4815

Working on my pacman project I have come across something strange. Im using the outline font method from NeHe and have used the code from there for text printing. When I copied it to my main method and texted it worked fine. But a lot of my objects need to …

Member Avatar for mrnutty
0
324
Member Avatar for heliodoros

hello guys this is my first attempt in C++ and i am getting an error :( the programs is made to read 20 numbers and find how many of them are even (like 2,4,6,20,40) [CODE] #include <iostream> using namespace std; int c[20]; int s = 0; int i = 1; …

Member Avatar for heliodoros
0
115
Member Avatar for acemaster3

1. Manipulate dynamic pointers and arrays of pointers 2. Use sorts, strings, searches and string functions. Procedure: 1. Your new software engineering group is hired for its first paying project to develop a console application to demonstrate a possible user interface for a next generation MP3 player. 2. Your C++ …

Member Avatar for WaltP
-2
180
Member Avatar for NordCoder

I'm creating a particle effect system in C++ with SDL. I'm coding a hiarcharchy like [URL="http://www.gamasutra.com/view/feature/3157/building_an_advanced_particle_.php?page=2"]this one[/URL] (scroll a bit down and you will see it). I have an abstract base class called Particle. It's abstract because I want the derived classes to be forced to implement the pure virtuals …

Member Avatar for NordCoder
0
156
Member Avatar for clutchkiller

[code] void NewCustInfo(CustData &cust) { cout << "Customer Name: "; getline(cin, cust.name); } [/code] CustData is a structure that is declared, and the name data member of that struct is of type string. For some reason when I call this function(there are no compile errors), it displays the cout statement, …

Member Avatar for clutchkiller
0
89
Member Avatar for charqus

Is there in C++ , a function like this ? [url]http://wiki.sa-mp.com/wiki/Format[/url]

Member Avatar for Salem
0
88
Member Avatar for missmedude

I just did this and I am not sure I am doing this correctly. You have purchased a stereo system that cost $1000 on the following credit plan: no payment down, an interest of 18% per year, and monthly payments of $50. The monthly payment of $50 is used to …

Member Avatar for Robert1995
0
114
Member Avatar for srinidelite

hello.. this is srini... is any one clear me the concept of BIT FIELDS........and what is necessity to use????? explain the below program..........i hope i can get a good reply from the great members [CODE]// BIT FILED // #include<iostream.h> #include<conio.h> struct word { unsigned w0:1,w1:1,w2:1,w3:1,w4:1,w5:1,w6:1,w7:1,w8:1,w9:1,w10:1,w11:1,w12:1,w13:1,w14:1,w15:1,w16:1,w17:1,w18:1,w19:1,w20:1,w21:1,w22:1,w23:1,w24:1,w25:1,w26:1,w27:1,w28:1,w29:1,w30:1,w31:1; }; union set { word …

Member Avatar for Fbody
0
157
Member Avatar for alhafes

Hi everybody please I want the way to create calculator by c++ builder by using the properties ( Graphical User Interfaces) Khalid

Member Avatar for Robert1995
0
126
Member Avatar for tajendra

I read some time back that memory operation on stack is much faster than heap. With this information the first thing came into my mind was that if we get a way to allocate memory dynamically on stack it would surely help us to optimize memory operation cost. I started …

Member Avatar for tajendra
0
3K
Member Avatar for missmedude

[CODE]#include <iostream.h> #include <conio.h> main() { int spm, mph; double spmRemainder, minInHour = 60, secInHour = 3600; cout << "Please enter the speed in miles per hour: "; cin >> mph; spm = secInHour / mph; spmRemainder = secInHour / mph; cout << "The speed of in minutes and seconds …

Member Avatar for WaltP
0
173
Member Avatar for jigglymig1

Right now i am having difficulty skipping the blank lines in the txt file i read in. I read in all the material i need, but the blank lines come in too and messes up my array. this is my txt file #### #M## #..# ##.# #..# #### 0 S …

Member Avatar for Salem
0
97
Member Avatar for GPPK

Hi Guys, I'm really interested in C++ and am currently making a basic Text based poker game. on a sideline to this does anyone know any simple encryption code or where to start when doing this? For instance taking a text file (.txt or even .doc?) and creating your own …

Member Avatar for VernonDozier
0
101
Member Avatar for dshiells

Basically I am trying to learn multithreading in C++. Platform: Windows XP. So far so good but I want to make sure I'm using mutex correctly. It compiles and runs as expected, but just wanted to make sure I use the CreateMutex() function in the correct place. Thanks! Here's my …

Member Avatar for thelamb
0
1K
Member Avatar for habib_parisa

Dear all, I am trying to understand a C++ code. In one part of the code a one dimensional vector is copied into a two dimensional vector. I do not understand at all how such thing can work. But compiler is quite ok with that. #define TOTAL_STEPS 120 #define NUMBER_DECISION_VARIABLES …

Member Avatar for habib_parisa
1
1K
Member Avatar for sblass92

Hi, I'm trying to create a vector array that contains pointers, and these pointers point to objects(particles) that have been created while the program is running. How do I use the appropriate de-reference operator to use functions of the class particle? ex. particle.move(); Here is what I have and my …

Member Avatar for sblass92
0
116
Member Avatar for Zhrate

Hello, I've been searching for hours now for a way to do mouse movement in a program while its minimized, so I can do other stuff etc while the mouse movements are doing their thing in the target window. Could anyone please give me a direction how to do this? …

0
32
Member Avatar for easyb

Dear Colleagues, Based on the concept of axiomatic semantics (stacks in particular), consider the expression below: [CODE]pop(pop(push(4, pop(push(top(push(6,s)), pop(push(7, createstack())))))))[/CODE] How can this be simplified for ease of understanding. Thanks

Member Avatar for Narue
0
55
Member Avatar for rookanga

I am having trouble trying to finish this program, What I am suppose to do is make a loop program that should ask the user for the employees number, gross pay, state tax, federal tax, and FICA withholdings. The loop will terminate when 0 is entered for the employee number. …

Member Avatar for Fbody
0
389
Member Avatar for TimeFractal

Hello, I need to simulate a stream which behaves exactly like a ostringstream, except when handling objects of type color. What is the best way to do this? [code] user.display() << color() << "Name: " << color(color::Red) << setw(10) << left << str_name << endl << color() << "Date: " …

Member Avatar for TimeFractal
0
2K
Member Avatar for bakwanyana

[code]#include <stdio.h> #include <time.h> #include <cstring> #include <iostream> #include <fstream> #include <sstream> using namespace std; int main () { ofstream file; stringstream ss; time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); char g[30]; char buffer[10]; itoa(timeinfo->tm_mday,buffer,10); strcat(g,buffer); strcat(g,"-"); itoa(timeinfo->tm_mon+1,buffer,10); strcat(g,buffer); strcat(g,"-"); itoa(timeinfo->tm_year+1900,buffer,10); …

Member Avatar for Ancient Dragon
0
213
Member Avatar for tom23

In need a simple code that will check if proccesname is running, and if it does it terminate the c++ exefile, but if it dont it will continue to the code i want to run, can this be done? please somone help me out only thing i need to complete …

Member Avatar for tom23
0
116
Member Avatar for alexRivera

i'm currently taking c++ courses in my college and have been noticing that i'm having trouble grasping the fundamentals of programming or even understanding the concepts that are being taught. the courses are taught with no textbook whatsoever so going back for references leaves me with my lecture notes and …

Member Avatar for alexRivera
0
100
Member Avatar for drewangel

hi, i want to solve 3 equations, which has 3 unknowns like this: a x1^2 + bx1 + c = y1 a x2^2 + bx2 + c = y2 a x3^2 + bx3 + c = y3 can anybody suggest mw how can i do it in C? i tried …

Member Avatar for ninjasmith
0
3K
Member Avatar for pjawili18

Hello, I'm writing a c++ code that reads a wav file and stores read values to a 1D array of integers. After doing some manipulation, I am able to write the values of the array to a new output wav. I use libsndfile library to do the reading and writing …

Member Avatar for Cesko82
0
479
Member Avatar for Stefano Mtangoo

Hi, I need to make application that will act as server and have clients. computers with client will get permission to go to internet or not via server. Only permission to go but they will connect directly on net (not a firewall). Its some sort of internet cafe management depending …

Member Avatar for Stefano Mtangoo
0
105
Member Avatar for malinik

Hi, Hope the stated 2 snippets are logically same. But I am getting error for the second code snippet. Generally the ternary operator statement is similar to a if else statement. regarding the second code snippet, where by the continue keyword is used in the ternary opertor statement. It throws …

Member Avatar for malinik
0
117
Member Avatar for bbrradd

heres my code. i need a triangle that looks like: **** _ *** __** ___* but mine looks like: **** *** ** * can anyone help ? [CODE]void drawTriangle(){ //function to hold triangle code char c; //variable to hold character to make triangle int height; //variable to hold height of …

Member Avatar for WaltP
0
126
Member Avatar for Web_Sailor

Hi, I am trying to compare 2 vectors to remove any kind of overlap. I have written a simple program but it gives a segmentation fault once I increase / decrease number of vector elements in both. Is there a better way of doing this. Especially suppose one of the …

Member Avatar for Web_Sailor
0
177
Member Avatar for ETP

Rational fractions are of the form a/b, where a and b are integers and b≠0. Suppose a / b and c / d are fractions. Arithmetic operations on fractions are defined by the following rules: a/b + c/d = (ad + bc) / bd a/b – c/d = (ad – …

Member Avatar for WaltP
0
160
Member Avatar for Menathradon

Hello All, I seem to be having a relatively small problem with a Maze program I'm working on. Basically, I read a txt file containing a maze into a 12 x 12 2D array, but the problem is when I try to display it, none of the white spaces that …

Member Avatar for WaltP
0
2K
Member Avatar for loststudent88

Hello I am working on a program and have become pretty confused... I am supposed to write a program that will convert html colours expressed as 6 hexadecimal digits to their individual red, green, and blue components expressed in decimal. If anyone can help me out with some pointers of …

Member Avatar for mrnutty
0
323
Member Avatar for megmar

I am looking to take a course in C++, but is that language popular now, or is everything more C? Please advise.

Member Avatar for kendricktamis
0
110
Member Avatar for kikat

I need to print the level order traversal of an AVL tree. I know how the idea works using a queue: enqueue the node, and then enqueue the left and right nodes of it. every node has a int data which needs to be printed but then the thing is …

Member Avatar for mrnutty
0
117
Member Avatar for Stefano Mtangoo

Hi, I'm finding generic container like vector but that can hold any variable just like a Python list. Thanks

Member Avatar for Stefano Mtangoo
0
87
Member Avatar for InnocentVamp

Hey friends, I want to know how does the IP Messenger work? How does it detect all the available online users? I searched on the web but due to Cyberoam restriction, I am left with very few options. I go by IP Addresses too, but even then I am not …

0
45
Member Avatar for blakenbama

Hello everyone, I need help. In my assignment i have an input file that contains string data: ----> i love music and chicken. today is the first day of the rest of your life. my name is john. I must change it to the following in the output file: ----> …

Member Avatar for Ancient Dragon
0
144
Member Avatar for elainadani

I need to create a function that uses a loop. This function will open a text file and then must be able to skip a variable number of leading random integers. The program must be able to handle any number of leading random integers. Example if the opened file reads …

Member Avatar for Ancient Dragon
0
152
Member Avatar for clutchkiller

Why are you able to declare them using the class keyword or typename keyword? Is there absolutley no difference? Thanks

Member Avatar for mrnutty
0
125
Member Avatar for Tech B

I downloaded a dll for head tracking, and have been trying to use it for some time now. I am trying to make a python script that uses it and am getting errors. [URL="http://www.daniweb.com/forums/thread265466.html"]This is the post.[/URL] I posted it in the python forums, and no replies yet, since this …

Member Avatar for Tech B
0
111
Member Avatar for jjmy95

I have an array of 20 elements with numbers between 1 and 8. I need a for loop that will give me the number of elements greater than 1???

Member Avatar for Grn Xtrm
0
141
Member Avatar for Flow2

Now I am on my way to making a little command prompt program where it types out the alphabet and removes the vowels as a test. BUT, here's the thing, no errors nothing but it doesn't work. Anyway here is the code if anyone can tell me what is wrong …

Member Avatar for Flow2
0
152
Member Avatar for ajjg123

Here is the prompt for my assignment Your third assignment is to write a C++ program that will print out the primes numbers between 2 and 100. However, you must use two functions in your program. The first function, factor, takes an int, n, and returns two factors of n …

Member Avatar for Lerner
0
147
Member Avatar for 'AnKo

Hello all! This is my first post to community! I've been writing a program in C++ (not MFC) to get a NTFS ADS file and copy it to desktop. If you don't know what ADS file is, you don't really have to matter, let's say that this program must just …

Member Avatar for 'AnKo
0
325
Member Avatar for Nicky4815

Hi all, I'm doing a 3d pacman game for a university project which has to be written in c++ (3rd year and having never been taught any c++) My problem is that when I initialise the map array I cannot return the value back to the main method. The values …

Member Avatar for Salem
0
105
Member Avatar for Candi~

Hi everybody, my name is Candi and I am new here, I was lucky enough to find this forum. I am new to C++ and am teaching myself because I can't afford school at this time, all I can afford is second hand books :( and I am having a …

Member Avatar for Fbody
0
141

The End.