49,761 Topics

Member Avatar for
Member Avatar for 07tr0wa07

Hi guys i'm new in C++..:icon_wink: I have a homework that i need to pass soon and i need help because i only have 1 error and i'm staring at it for 2 hours:icon_cry: going back and forth to my book and came up with no solution:icon_sad:. ok so heres …

Member Avatar for Lerner
0
265
Member Avatar for Stefano Mtangoo

Some C++ buzzwords a programmer need to grasp really boggles my mind. I try to understand them but I strangely, get dim understanding of them (am I tired? Need a vacation?). Anyway please help me understand the following big words in C++ 1. Virtual Functions 2. Polymorphism Thanks alot

Member Avatar for Stefano Mtangoo
0
648
Member Avatar for richman0829

I think the pieces, taken separately, are okay, but they don't seem to play together well. [CODE] //lab12: This program requests input of ten employee names and salaries; //a file is created and they are written into it, and the file is closed. //The file is then reopened and the …

Member Avatar for Lerner
0
105
Member Avatar for DevC++4.9.9.2

hey im trying to do a quick mod function, i know % exists but this will have other applications... Basically the main issues is when you return "num" it is a different value than if you look at num before it is returned... Any ideas? thanks in advance [code] int …

Member Avatar for r.stiltskin
0
122
Member Avatar for BigTito89

Hello, for my final team project for C++ we are making a simple space invaders clone with the [URL="http://www.libsdl.org/"]SDL[/URL] libraries. Most of it is working great so far but in order to 'destroy' the enemies, they must not be drawn anymore and should be destructed. ER is just the # …

Member Avatar for BigTito89
0
159
Member Avatar for Fenrir190

[CODE] void readData(ifstream& file, char& operation, int& numOfData) // Purpose: To read data from a file specified by the user { file>>operation>>numOfData; if(operation == 'I') { Array<int>* array; array = new Array<int>(numOfData); } } [/CODE] That's where the problem is coming from. [CODE] const int DEFAULT_SIZE = 30; template <class …

Member Avatar for r.stiltskin
0
223
Member Avatar for amishraa

So I have calculated the total of students on all of their 6 grades but now I want to be able to calculate the average of all the grades and list the averages next to the total column. Any help would be greatly appreciated! [CODE] //preprocessor directive #include<iostream> #include<iomanip> #include<fstream> …

Member Avatar for cibaiciao
0
387
Member Avatar for Der_sed

How should I define the next() fucntion- LINE 69. For now the get_string isnt even fetching the string from the In_box //09030032 at lums [CODE] //====================================== //Stroustrup Interface Libray files //====================================== #include "Simple_window.h" #include "Graph.h" #include "GUI.h" #include "Window.h" #include "../std_lib_facilities.h" //====================================== //Load neccessary header files //====================================== #include <fstream> //to …

0
54
Member Avatar for confusedndazed

Hello guys....I appreciate any and all replies I get but I really needed to be [I]shown[/I] how to incorporate a program title and a function call into this code and have it properly execute. I am really lost with programming so I don't usually understand explanations unless I can actually …

Member Avatar for confusedndazed
0
100
Member Avatar for Snippset

Hi, I want to change words from a readed text file. To be more precisely, I need to change the date type in a text file to their representing digits. Example 2002 y. June mon. 1 d. is the given text. 02-06-01 is the output. So, any thoughts for getting …

Member Avatar for Lawand
0
94
Member Avatar for helixkod

current code: [CODE] void showMedian(int *array, int size) { double middle; double average; middle = size / 2; if ( middle % 2) { average = (*(array[middle]) + *(array[middle + 1])) / 2; cout << "The median is: " << average << endl; } else cout << "The median is: …

Member Avatar for cibaiciao
0
248
Member Avatar for Clinton Portis

I thought this website on coding conventions was pretty cool.. learned some things that I never knew before: [url]http://www.possibility.com/Cpp/CppCodingStandard.html#init[/url] I was just wondering: If there are any conventions in particular you agree or disagree with (and why) If this would be worthy of being a 'sticky post' as I think …

Member Avatar for Lawand
1
148
Member Avatar for pac-man

Quick q, What function takes precedence with a template function vs a non-template function? I set up the following code but my result had the following output Template Template even though a guide I read said it should read: Template Non-template [CODE]// Testing template function vs non-template function to see …

Member Avatar for mrnutty
0
109
Member Avatar for Snippset

Hi, I need to check if two provided words doesn't have the same letter in it. And as I just started with this text thingy, I don't really know much about. For starters I got this code: [CODE] if (strcmp(Z1, Z2) == 0) Memo1->Lines->Add("Z1==Z2"); else if (strcmp(Z1, Z2) < 0) …

Member Avatar for Snippset
0
167
Member Avatar for eduard77

I am trying to make a software that reauires a matrix like this 1 4 0.4 0.8 0.9 4 5 8 15 25 68 19 14 0.8 0.15 5 45 2 7 8 6 1 9 0 5 17 5 9 1 7 0.5 0.18 0.16 etc the matix has …

Member Avatar for Agni
-1
90
Member Avatar for gedas

hey everyone i have a task to write down the adjacency matrix of this graph and im a little unsure how it should look i hope there is someone that can help, thx in advance:-/

Member Avatar for Lerner
0
80
Member Avatar for squadjot

Hi, i'd like to start a commandline executeable, and then be able to read the content of the output it produces. - Im NOT looking for a Stdout function. Concider having a bat file with following content [CODE]ping google.au ping google.dk ping google.de ping google.se ping google.no ping google.fi ping …

Member Avatar for squadjot
0
124
Member Avatar for Cy137

I keep receiving the same output for each record when I run it on the test data. I've tried numerous things...any suggestions? I've worked on this for almost twelve hours straight, not counting previous work. I'm hoping one of you guys/gals who know whats going on can point me in …

Member Avatar for mrnutty
0
187
Member Avatar for sidra 100

can anyone guide me about the type of questions which can b asked in the paper of programing. i m student of mcs first semester.plz help me

Member Avatar for mrnutty
0
59
Member Avatar for guccitan88

I'm not understanding my assignment and what I've read has really confused me. This is what I need to do: write a function to initialize an integer Partially Loaded Array with distinct random values. The array has room for 50 elements. The actual number of elements to store will be …

Member Avatar for guccitan88
0
132
Member Avatar for Reimschmied

Hi all, Could someone help me? I have programm that reads xml file and displays it in window with StringGrid. I need to replace my code with a function that has xml file as a parameter and returns two-dementional array of strings (instead of StringGrid). You can see my code …

Member Avatar for Ancient Dragon
0
133
Member Avatar for grib

I'm attempting to use a specialized function to search an array of c strings for the longest (or first tied for longest) member. Right now, I'm getting [inlinecode]line 87 error: invalid conversion from `char' to `const char*'|[/inlinecode] on my comparison statement. If I switch the templates' inputs to const, I …

Member Avatar for DavidRead
1
123
Member Avatar for DweyneAnne

i have a homework for our programmin classes, i searched for other solutions regarding the gotoxy function, but all saw was for devc++, turboc++ and other IDEs, when i use the function for devc++ or turboc++, i know it wont work, but i tried it, says there's not library for …

Member Avatar for DweyneAnne
0
239
Member Avatar for grassboy

Hello... I've studied FIFO in recent days... and tried to write some code (Linux C) for practice... but there are some bugs in my code... I don't know how to solve it... here is my code... [code] #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> int main(){ char …

0
48
Member Avatar for ahsanmalik

Our teacher gave us this project and i have no idea about how to get started with it....can someone give me any guidelines about it please????!!!! "You are required to implement an “Online Testing System” which should be able to store questions along with their answers in the question bank …

Member Avatar for ahsanmalik
0
108
Member Avatar for Cy137

So far, this has worked relatively nicely. However, I am having trouble in outputting to two separate files, and I'm hoping that you guys and gals can help me out. I'm reading in from a file, and outputting to two different files, based on what the input is. If anyone …

Member Avatar for Cy137
1
181
Member Avatar for Spreegem

I had to develop a brute force, a recursive, divide and conquer, and transform and conquer algorithms for calculating the nth power of a, a^n, for an assignment. I got the first three done pretty easy but I'm completely stumped at how to do the transform and conquer algorithm. I've …

Member Avatar for Nimmy Chohan
0
177
Member Avatar for joshjgordon

I am trying to use pow in c++ and for some daft reason it is not working properly. I have used it before with no issues, so I am sure that there is just something that I am overlooking. here is what I have: [CODE] const double epsilon = cutoff_velocity …

Member Avatar for sidra 100
0
81
Member Avatar for muhammad zain

hi, I need help in adding questions in a program using strings, structures or array............. Plz help me n snd the code

Member Avatar for Clinton Portis
0
88
Member Avatar for Rockdrummer357

So, I need to make a binary tree, except each node needs to hold multiple data types... My instructor told me to use structures, but I am still lost as to how to put all this data into the tree. [CODE]struct record{ long int student_id; char lastname[12]; char firstname[12]; char …

Member Avatar for Rockdrummer357
0
103

The End.