49,761 Topics

Member Avatar for
Member Avatar for tofugames

Hello, I am working on a program for school and this is my first experience with arrays of objects. I am passing the array of objects into a function, and from within that function I am running another function that takes an individual object from the array as an arguemnt …

Member Avatar for thekashyap
0
242
Member Avatar for bkoper16

I am trying to make my program print out the contents of a vector containing objects of class type Checking i want it to print the balance of each element in the vector but when i try to use [CODE]cout<<checking[1][/CODE] all i get is nonsense characters here is what i …

Member Avatar for Chilton
0
108
Member Avatar for fat0ali0ma

Hi evreybody can anyone help me to solve this problem in introduction of algorithms ( Suppose program A has time complexity θ(f(n)) and program B has time complexity θ(g(n)) where f = o(g). What can you say about the real-world running time of program A versus program B?) plz im …

Member Avatar for mrnutty
-2
107
Member Avatar for gladtoplay5

Just a few days ago I was working on a encrypting program that would take a character and convert it to the corresponding number. while working on it I found that you could input multiple letters and it would loop through all the letters and I can't figure out why …

Member Avatar for gladtoplay5
0
122
Member Avatar for stkarnivor
Member Avatar for mike_2000_17
0
576
Member Avatar for Admiral Pimms

Greetings, I'm currently engulfing myself into game programming, and so far I've made a pretty stable library for a 2D-side scrolling shooter. Note that I'm not posting this in the game development due to my issue being more general than game-specific. What I'm experiencing trouble with, is upon deleting an …

Member Avatar for Admiral Pimms
0
422
Member Avatar for Bead

hello this is my first C++ program my problem is that i cant find out to things frist is that when i rune it and sett the mathe type it is ignored laiter and hit shows alle offe the posbole mathe types ( that i have enterd +,-,/ and * …

Member Avatar for l1nuxuser
0
159
Member Avatar for n0de

Hi, after making some adjustmens to my code as recommended, I get those discard qualifiers errors.. [CODE] //pentathlete.h #include <iostream> using namespace std; template < class T > class pentathlete { protected : T comp_res [ 5 ] ; public : T sum_res ; pentathlete ( ) { for ( …

Member Avatar for n0de
0
1K
Member Avatar for shazzy99

Hi, I've written a code to count vowels and consonants. But it hangs and doesn't do anything when a function call is made or even before that at get statement. When I try to get a string from user to pass to the function to count vowels or consonants. Here …

Member Avatar for shazzy99
0
140
Member Avatar for lexusdominus

Ok, so ive had this really annoying problem with Visual C++. It bugs me because it doesnt make any logical sense. something i guess we need to program. Anyway, Visual C++ reckons that the datatype "string" isnt defined, even though it is in the included library string. If i right …

Member Avatar for lexusdominus
0
124
Member Avatar for kevinn

Hi, I need to write some code for an application that uses a camera with an gigabit ethernet connection. The company who made the camera has provided header files to read images from the camera. The files are : ImageLib.h , PvApi.h and PvRegIo.h. I wrote some code in Snap.cpp …

0
52
Member Avatar for geekme

hello, I'm trying to install and use boost graph library file sin my code blocks IDE for C++ program but am unable to.Please help.

Member Avatar for mike_2000_17
0
578
Member Avatar for garber

[CODE]#include <iostream> using namespace std; int main() { int sum = 0; // Declare an int variable sum to accumulate the numbers int lowerbound; // Set the initial sum to 0 int upperbound; // Sum from 1 to this upperbound // Prompt user for an upperbound cout << "Enter a …

Member Avatar for mir wasif
-1
3K
Member Avatar for Tursup

Hello, I am trying to put finishing touches on a program I have been working on. I stopped messing with it awhile ago and decided to return and polish it a little. Oh yeah, I am trying to make it so when it returns the 5 long number (or word …

Member Avatar for TrustyTony
0
129
Member Avatar for Tinee

Hi, I need help finding the problem with my program. I believe everything is working but when I input the the tolerance, the program suddenly terminates. Please help me spot the problem. By the way, as a warning my program is very long but redundant. hehe. [CODE]#include <iostream> #include <string> …

Member Avatar for mike_2000_17
0
131
Member Avatar for Labdabeta

How can you play videos in C++, I am quite willing to use more than less any headers, I basically need a code that will work like this: [CODE]#include "PlayVideos.h" int main(int argc, char *argv[]) { SDL_Surface *screen=SDL_SetVideoMode(WINWIDTH,WINHEIGHT,WINBPP,SDL_SWSURFACE); ShowVideo("MyVideo.avi",0,0,screen);//play a video at position 0,0 and apply it to the screen …

Member Avatar for mike_2000_17
0
183
Member Avatar for cafegeo

I have a data file which includes an employee name, hours worked, salary and age. I have to manipulate this data: Print out the data as it is read in. Compute overtime(over 40 hours) Compute tax paid per employee using a specific formula. Sort the list by name. And a …

Member Avatar for cafegeo
0
3K
Member Avatar for jimmymack

[CODE]#include <iostream> #include <string> // Declare the BaseClass. class BaseClass { public: // Constructor. BaseClass(); // Destructor. ~BaseClass(); // Simple method. void doSomething(); }; // Declare a SubClass that // inherits BaseClass. class SubClass : public BaseClass { public: // Constructor. SubClass(); // Destructor. ~SubClass(); }; // Define the functions. …

Member Avatar for mike_2000_17
0
97
Member Avatar for Jsplinter

I'm having trouble overloading the operator< for a class that I want to use as a key for an stl map. It works fine for a comparison test, but when I try to use the std::map.find() function I get an error: [I]binary '<' : no operator found which takes a …

Member Avatar for mike_2000_17
0
2K
Member Avatar for miguelsan

Hello guys I have been staring at this code for an hour and cant get it to work. My for loop on the bottom is not working. For some reason the array values keep resetting (value[row][col1]. This supposed to be Gauss-Seidel method so basically its an iterative method that relies …

Member Avatar for miguelsan
0
90
Member Avatar for jxe217

I'm having an issue with my program when I call the "drawCardFace" and "drawCardSuit" functions. The function calculates and gives one answer the first time I call it. And then uses that same answer the next 4 times I call it. Can someone explain what I need to do to …

Member Avatar for jxe217
0
212
Member Avatar for CelticWhisper

Hi all, First-time poster and netadmin/infosec guy trying to get into coding. My company uses a SQL Server 2005 database to store customer information and the like, and I'm hoping to learn to interact with it programmatically so I can write and/or customize software to make life a bit easier …

0
154
Member Avatar for cppjosh

Hey everyone! I was recently assigned this program in class and have finished it but i have some compiler errors i cant fix. I was just hoping that some of you could give it a shot and share what kind of code you came up with. Well here it is …

Member Avatar for Akill10
0
363
Member Avatar for sciprog1

I am testing a program in C++ Templates (from the Deitel Textook) and I have the typical three files: Array.h: [CODE]// Exercise 14.7 Solution: Array.h // Class template Array definition. #ifndef ARRAY1_H #define ARRAY1_H #include <iostream> using namespace std; template < typename elementType, int numberOfElements > class Array { public: …

Member Avatar for sciprog1
0
146
Member Avatar for jk09

i want to apply a technique of sorting the numbers using binary search tree . Average case of building a tree is O(lg n) and then if i apply Inorder traversal , i could get sorted output. So, can this technique be used over others like mergesort , quicksort etc. …

Member Avatar for Narue
0
99
Member Avatar for jswain323058

I have this Code written but I am having problems with the While loop I need it to recognize if the password has less then 5 characters and if there are spaces. I just cannot get it working for the spaces. Can anyone help?? [CODE]#include <iostream> #include <vector> #include <string> …

Member Avatar for jswain323058
0
88
Member Avatar for miskeen

Hello, I need to random generate some values in c++. I know that I can use rand() but I need to generate values with the following condition: the generated values must be equal to 2^n (0, 2, 4, 8, ...). Is that possible? Kind regards, M.

Member Avatar for vijayan121
0
225
Member Avatar for israruval007

ok my getData() function reads a text file and stores it into an array called info, and everytime it reads a letter from that file it calls a member called addRear which comes from my link list class "slist". what i need help on is how could i display this …

Member Avatar for Lerner
0
154
Member Avatar for vikrantk
Member Avatar for iamthesgt

I was reading through the SIP documentation and was confused on a few things. I can't figure out what code to implement to open a transaction between a server and client. What IP address and port and what encoding should I use (for a video server). Thanks for any help.

Member Avatar for ziggystarman
0
325

The End.