49,761 Topics

Member Avatar for
Member Avatar for nola_Coder

I'm creating a simple platform scroller using C++ and the Allegro library, and also .fmp maps created using the tile-based editor Mappy. I have two maps created, which will serve as my two levels. Once the first map is run through, I want to switch to the second map. What's …

Member Avatar for Salem
0
170
Member Avatar for stevendavis84

Employee.h [code]// Base class. #ifndef EMPLOYEE_H #define EMPLOYEE_H #include "stdafx.h" #include <cstring> // Constant for the name's default size const int DEFAULT_SIZE = 51; class Employee { private: char *name; // The name double empNum; // The employee number int hireDate; // Number of hire date on hand // Private …

Member Avatar for abhimanipal
0
394
Member Avatar for faceguy1

Hello, I am a novice programmer in C++. I know only basic object-oriented ideas and my teacher thinks it is the worst thing that ever happened to mankind and because of that, I only know procedural programming. In addition, he has us use archaic compilers such as CodeWarrior from 10 …

Member Avatar for Ancient Dragon
0
118
Member Avatar for sah15

Hi, I'm supposed to create a program where I want to purchase tickets to a theater based on rows and columns of the seats. The program uses two-dimensional arrays and constructors, and is supposed to display somethine like this: "ASU Gammage Theater 1. View available seats 2. Request tickets 3. …

Member Avatar for Lerner
0
233
Member Avatar for fellixombc

Alright, so, I decided to write an IRC Bot in C++ to get used to socket programming. Everything went fine of course, but I have one bug: when the server sends me a PRIVMSG (a message sent by a user to the server, then comes to me) it prints a …

Member Avatar for fellixombc
0
261
Member Avatar for sravs25

hi friends, i am doing visual c++ course , i got a image which captured from webcam, that image to be stored in 2d array can any one help me how to store that RGB image in to an array please.

Member Avatar for sravs25
0
1K
Member Avatar for jumomma

Hi all, I am very much a beginner and I'm struggling just to pass this class..so go easy on me. I keep getting this 1 error and I cannot figure out why. I'm sure it's something simple but I'm at a dead-end here. This is the error I get, it …

Member Avatar for jumomma
0
311
Member Avatar for bigt666

I'm trying to do a program that gets the averages of positive and negative numbers in an array that consists of numbers I have to read from a file.txt. I'm having trouble in how to put the numbers in the file.txt into the array and I can't seem to understand …

Member Avatar for VernonDozier
0
106
Member Avatar for abhimanipal

Hello people I have a small doubt in operator overloading I am trying to overload the assignment operator. Here is my code for that [CODE] class rational { int x; int y; public: //All the constructos rational operator= (rational num) { // Why do we need to return a reference …

Member Avatar for Ancient Dragon
0
156
Member Avatar for fregley

Hi everyone! This is my first post. I'm relatively new at c++, but not completely ignorant, so please bear with me. Anyway, I'm trying to create a game in a console application. However, I don't really know how to have multiple things happening at once. At this point, I want …

Member Avatar for fregley
0
149
Member Avatar for c++2ndLanguage

Hi everyone, I am working on a project that requires me to write a program which given a single word will search a database of thousands of songs and will return the artist, title, and the context in which the word appears in the song. Each song has a SongId …

0
40
Member Avatar for Lukezzz

Hi, I have a question about when you have compliled a Form application as a release where the product exists of: - exe.file - Program Debug Database - Incremental Linker File What I now wonder is that I have in my project some important usernames and passwords. My question is …

Member Avatar for VernonDozier
0
99
Member Avatar for ollie60

I am using a linked list for the first time and am trying to add an entry to the list. However I am getting an error in this section of code: [CODE]if (is_tri == true) { //add the triangle to the list ListElement *p = new triangle((*nodeVec[i]), (*nodeVec[j]), (*nodeVec[k])); triList.AddElement(p); …

Member Avatar for tkud
0
79
Member Avatar for Instinctlol

How would I do something like this? I know that this will not work, I'm just using it to show what I need with help. When a user is suppose to enter a number, but instead enters a string or char, it gives him a cout message saying it doesn't …

Member Avatar for VernonDozier
0
78
Member Avatar for bsse007

will any body plz tell me about random access file.i need to know about write random data on random access file. this data can be of any txt file?kindle mention some initial coding.reply sooooon plzzzzzzz

Member Avatar for The ICE Man
-1
97
Member Avatar for Teethous

Hey guys I am having a problem writing to my text file. I notice when the data is written some of it comes out as gibberish. Take a look and let me know what I am doing wrong. Thank you. [CODE] #include <iostream> #include <string> #include <fstream> using std::cin; using …

Member Avatar for Fbody
0
164
Member Avatar for Dinglish

i am writing a program whereby i have written the instructions the shell of the program, and have written code for inputting values, but how do i collect all the information i have inputted. I am aware it involves arrays but can you help and point me in the right …

Member Avatar for caut_baia
0
102
Member Avatar for beginnerprogram

A square plate divided in 100 squares or nodes by a grid. the temperature of the nodes form a two-dimensional array T[i][j] .the temperature in all nodes at the edge of the plate is constrained to be 20*C by a cooling system, and the temperature and the temperature of the …

Member Avatar for nezachem
0
269
Member Avatar for Annettest

Hi everyone: I'm having problems constructing a loop and I'd appreciate any advice. This is probably a simple problem, but I just can't make it work! This isn't homework! I'm an old fart and I'm new to C++. Here's what I want to do: take a vector and insert it …

Member Avatar for Annettest
0
187
Member Avatar for nerak19

[code]#include "stdio.h" #define ROW 4 #define COL 4 void input_matrix (int, int, int A[][4], int B[][4]); void add_matrix (int, int, int A[][4], int B[][4], int C[][4]); void loadidentity_matrix (int, int, int D[][4]); void main (void) { int A[ROW][COL]; int B[ROW][COL]; int C[ROW][COL]; int D[ROW][COL]; int i, j; input_matrix (ROW, COL, …

Member Avatar for nezachem
0
133
Member Avatar for restrictment

Hello everyone, I am trying to make a simple web browser for my own benefit (not a school project). I have been looking through multiple videos on how to do so, and could only find 'simple' web browsers on almost every video for visual c++. Anyway, the videos work, but …

Member Avatar for jonsca
0
208
Member Avatar for manish.ranjan
Member Avatar for jwenting
-2
77
Member Avatar for Ianonfire

Stupid request i know :S but i wrote this program so long ago and my C++ knowledge is so bad i need help remembering how it works :( ive completely forgot how linked lists work ive been working with javascript + java and amoung all my uni assignments my brain …

Member Avatar for Fbody
0
115
Member Avatar for samurai1200

I have a 2D array whose cells represent each character in a terminal window that can either be ON or OFF (boolean). [CODE] bool grid[24][80];[/CODE] Then, using the ncurses API, I grab a key press: [CODE]key = getch();[/CODE] where key is an int type. The 'q' key is what I …

Member Avatar for samurai1200
0
688
Member Avatar for miturian

So, I'm still working on my matrix class (in case anyone reading this also read my thread from the other day). I really like the array-feature that I can initialize an array with a list of numbers, such as [CODE]double array[2]={1,2};[/CODE] and would like to implement that in my matrix …

Member Avatar for miturian
0
81
Member Avatar for NinjaLink

My program is created to output permutations. Depending on the input that I put in, I sometimes get the correct result, but it is not accurate. However, when I do "abc", I get the correct result. When I input peoples names, I get a random result. After trying to figure …

Member Avatar for Sodabread
0
130
Member Avatar for mmpjb

Hi all, Currently trying to write a piece of code for a project at university, with very little C Compiler experience I am struggling... Basically- we have 8 LED's, and 8 switches. We want 4 of the 8 LED's to light up at random when the program is run, that …

Member Avatar for jwenting
0
300
Member Avatar for Phasa

It compiles and runs, but after "Here is the starting empty cubes vector" prints, I get this message: [B] Debug Assertion Failed![/B] [B] Expression: vector subscript out of range[/B] Can someone help me, please? [code=CPP] #include "stdafx.h" #include <iostream> #include <vector> using namespace std; // Cubed integers class cubes { …

Member Avatar for caut_baia
0
137
Member Avatar for shrutinr

Hi.... I m doing my project in vc++ exp edition.. My problem is, i store my value in a textBox1.. Now i want to pass that value to the CAN variable type NCTYPE_UINT8 .. NCTYPE_STRING arr[100]; arr[0]=this->textBox1->Text; while compilation the error is raising like: "error C2440: '=' : cannot convert …

0
61
Member Avatar for jelinky

hey, i am new here but i have taken a few c++ classes. im having trouble with a very easy program and i just cant figure out why its doing this. ive looked around the forum already and didnt find anything helpful so i thought id ask. [CODE] include <iostream> …

Member Avatar for bugista
0
138

The End.