49,761 Topics

Member Avatar for
Member Avatar for rcmango

Hello, i am very interested in the c++ language, i decided to make my own small program and test how arrays work with classes with private variables and private operations and then calling them any way i'd like from the main function. a very big reason about this is probably …

Member Avatar for rcmango
0
119
Member Avatar for smeghead007

Ok what im tryin to do is open a file by the name a user request after that i ask the user and id number to look for in the file if its found i want to display it along with the name after it but i cant figure out …

Member Avatar for WaltP
0
102
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
109
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
80
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
122
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
116
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
305
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
113
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
176
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
151
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
86
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
84
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
110
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
156
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
123
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
164
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
93
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
98
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
112
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
386
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
209
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
114
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
96
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

The End.