49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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'; … | |
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 … | |
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 … | |
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; … | |
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++ … | |
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 … | |
[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, … | |
Is there in C++ , a function like this ? [url]http://wiki.sa-mp.com/wiki/Format[/url] | |
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 … | |
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 … | |
Hi everybody please I want the way to create calculator by c++ builder by using the properties ( Graphical User Interfaces) Khalid | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? … | |
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 | |
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. … | |
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: " … | |
[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); … | |
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 … | |
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 … | |
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 … |
The End.