49,766 Topics

Member Avatar for
Member Avatar for ShEeRMiLiTaNt

Hello, I need to write a program to take in a name (max 101 characters) and out store in into an array so that I can output it like a list. These 2 programs are apart of a bigger program that keeps asking if you want to add another name …

Member Avatar for VernonDozier
0
340
Member Avatar for olusegun.oluwadamilola

A student was arrested for drunk driving. There was some confusion during the arrest, which lead to the student's blood not being tested for alcohol level. The student was taken to the police station and at the station he was tested using an A.L.T. program. The A.L.T. program was developed …

Member Avatar for np complete
-2
81
Member Avatar for muhammads

Hi, I am totally new to lib png and png++ and have recently made my first project with these on linux. But have no idea how to use png++ on windows. I have my libpng configured on windows and am wondering how to move towards making png++ available and running …

Member Avatar for muhammads
0
1K
Member Avatar for krishal.lad

The following are the requirements of the program and all code can be written within one C++ source file for the purpose of this assignment. 1. Declare three structs to store Athlete, Event and Registration details. The struct definitions are provided in Appendix 1. 2. Write the driver code (main) …

Member Avatar for Bob
0
806
Member Avatar for cool_zephyr

Could anyone tell me how to make a BSP tree?? like what things should i consider to implement it?? i'd be grateful if anyone gave me a list of basic steps to implement it..thank you

Member Avatar for cool_zephyr
0
140
Member Avatar for Secone

Hello, I'm trying to have my program locate any duplicate strings in an array, say, there were two instances of the word 'man', it would add 1 to the Word Amount of that word, and move the duplicate to the back of the array in some way. The problem is, …

Member Avatar for vijayan121
0
240
Member Avatar for daino

My initial thoughts on the default constructor are that it was called automatically. From what I can see, it seems that this is so but a constructor called automatically doesn't initialize int or char variables for exampe, to Zero as I originally thought. It appears that they initialize the variable …

Member Avatar for vijayan121
0
299
Member Avatar for r0vanz01

I am trying to find the minimum number when the user enters any 5 numbers I am not sure why this code is not working, every time I run this function I always get 0. Can someone please tell me what is wrong! int i; int num1 = 5; int …

Member Avatar for r0vanz01
0
188
Member Avatar for pkfx

Im trying to increase a dynamic array by 1 element and assign a integer variable to it but recieve a heap overload error. Any advice would be appreciated. void CardSet::AddCard(int cardNum) { int* tmp; nCards++; tmp = new int[nCards]; for(int i = 0; i < (nCards - 1); i++) { …

Member Avatar for Ancient Dragon
0
185
Member Avatar for dreday92

///Can someone tell me why I am having an issue calling my functions?!?!?! #include <iostream> #include <iomanip> #include <string> using namespace std; struct Players { string name; int numPlayer; //Number of the Player int numPoints; //Point's scored by Player }; const int SIZE = 50; const int MAXPLAYERS =3; typedef …

Member Avatar for Ancient Dragon
0
172
Member Avatar for Carpetfizz

Hello, I learned a lot of basic C++ programming through Code Blocks and I think it is a fantastic IDE. I decided to switch to VS2010 Professional for various reasons, and because I am able to get it free from Dreamspark. I had created another post a while back similar …

Member Avatar for Suzie999
0
167
Member Avatar for Salman93

program in which we calculate total marks in a course and print a course grade by using if-else conditions. However check, if user enters correct marks or not, for example midterm marks is between 0 to 20. If user enters midterm marks less than 0 or greater than 20 then …

Member Avatar for WaltP
-2
130
Member Avatar for riccardo-m

Hi, I've been trying to send a long integer from an Arduino to my C++ program via the serial port. There seems to be many examples of this when i search, but I've not had much luck except for one example. This example seems to work, but not when I …

Member Avatar for riccardo-m
0
3K
Member Avatar for rtyui

Hi. I am trying to assign the value returned by asctime(struct tm \*) to a string. But when the program is run, I got segmentation fault. GDB shows: Program received signal SIGSEGV, Segmentation fault. 0x0000003e6d6aa192 in __offtime () from /lib64/libc.so.6 What could be the reason? Can't we assign the value …

Member Avatar for deceptikon
0
381
Member Avatar for pattilupwned

Hello, I am having trouble passing a file into parallel arrays. Based on the code below, I get a bunch of jumbled numbers on my cout screen that don't even show up in the input file. I have attached a PNG of the console output. I am at a loss …

Member Avatar for Suzie999
0
437
Member Avatar for maple23

I am trying to learn multi-dimensional arrays in C/C++, but am not having much luck. I think I understand the way this type of array works, but I am having problems. [code]#include <stdio.h> #include <stdlib.h> #define MAX_NAME_COUNT 10 #define MAX_NAME_LEN 100 int main(){ char *names[MAX_NAME_COUNT][MAX_NAME_LEN]; int x; printf("enter the names …

Member Avatar for richard_arnold
0
768
Member Avatar for agachhayat

//This programm is for testing function overloading #include <string> #include <fstream> #include <iostream> using namespace std; class Text { string str; public: Text (); Text (string); string contents (); }; Text::Text (string st) { ifstream in (st); getline (in, str); } string Text::contents () { string ret; ret=str; return ret; …

Member Avatar for np complete
0
82
Member Avatar for melissa.kapolka

void getScores(float **scores, int num) Can someone help me understand what this means? Especially the **scores.... I know what a float is and that it is to get scores inputed in by the user. Thanks

Member Avatar for melissa.kapolka
0
95
Member Avatar for andigirlsc

I am having trouble getting MS Visual C++ to recognize my input for the 2nd getline I have listed. It already recognizes getline(cin, firstName) and allows for input, but won't recognize the second instance of getline. When the program gets to that line of output, it bunches the next two …

Member Avatar for deceptikon
0
388
Member Avatar for ChilledGrease

I started coding C++ this past week, and yesterday I challenged myself to write something original that my book doesn't have hints on. It is a program that prompts the user to think of a number between 1 and 100, and proceeds to guess the user's number. The user tells …

Member Avatar for Suzie999
0
288
Member Avatar for nitishok

I have written a program for the 8-Queens problem.It prints all possible solutions. queens() finds all the possible solutions. ok() tells whether the given column and row is safe or not. The very strange problem is: 'Count' won't increment. I have no idea why. #include<iostream.h> #include<stdlib.h> #include<conio.h> int arr[8][8]={0}; int …

Member Avatar for deceptikon
0
167
Member Avatar for nikhil.pro
Member Avatar for Ancient Dragon
0
104
Member Avatar for riccardo-m

Hi, I'm making a program using Visual Studio 2010. I'm strugging with how to correctly use classes and their instances. For example; What is the difference between using the following ways to call function from one class within another... Example 1: Dialog.h #include OtherClass.h MyOtherClass myClass; Dialog.cpp myClass.MyFunction(); Example 2: …

Member Avatar for riccardo-m
0
257
Member Avatar for Tinnin

Hi all. I'm working my way through "Accelerated C++" have a question regarding chapter 5. The program calculates students final grades by taking a median of the homework grades. I am trying to alter this program so that it uses *list* instead of *vector*. The issue I'm having is with …

Member Avatar for Tinnin
0
173
Member Avatar for dhruv_arora

My school and the education board uses Turbo C++ as the compiler. I have Windows 7 64 bit. Can anyone tell me how can I install Turbo C++ on my computer.

Member Avatar for harsh01ajmera
0
452
Member Avatar for 03Mach1

So I am trying to write a program that will tell you the lowest grade and the highest grade out of the 3 wthat you put in and also tell you the current average you have in the class. I got the lowest and highest part taken care of but …

Member Avatar for np complete
0
263
Member Avatar for linc186

I've been trying to get this to build for hours, I have no idea what's wrong. Any help is appreciated, thank you. Here's the code: main.cpp #include "SDL/SDL.h" #include "Core.h" #include "GameStates.h" #include "globals.h" int main(int argc, char** args) { if(core.Initilization(640, 480, 32, SDL_SWSURFACE) == -1) { SDL_Quit(); } while(core.desiredstate …

Member Avatar for gusano79
0
283
Member Avatar for limzhengtong

**this is my displacement.h** #ifndef DISPLACEMENT_H #define DISPLACEMENT_H class displacement { public: displacement(double, double, double); double getvalue(); private: double s,t,a,v ; } #endif **this is my displacement.cpp** #include "displacement.h" ;using namespace std; displacement::displacement(double t1,double a1,double v1) { t=t1; a=a1; v=v1; s = v * t -(0.5) * a * t …

Member Avatar for zvjezdan.veselinovic
0
408
Member Avatar for slasham

im very new to c++ and was just wondering if its possible to make a simple program where you type the name of the file and when you press enter it downloads that file from the internet to a certain place on your computer. where would the files be stored? …

Member Avatar for np complete
0
860
Member Avatar for muhammads

Hi All, I am new to C++ on linux enviroment and am trying to use the png++ library for a project. The problem i am facing is that that a simple program i write using png++ incudes does not work and shows me the following errors > AProg.o: In function …

Member Avatar for np complete
0
278

The End.