49,766 Topics

Member Avatar for
Member Avatar for confusedndazed

My question: What is the output of the code corresponding to the following pseudocode? [code=text] Set y = 0 For (i = 0; i<=6; i=i+3) For (j = 0; j<=15; j=j+5) Set y = y + 1; End For (j) End For (i) Output y [/code] This is what I …

Member Avatar for rafta
1
122
Member Avatar for KRal

// I am new to C++ and can not seem to get the falling man to output to the screen. Any help would be greatly appreciated. [code] #include <iostream> #include <windows.h> using namespace std; void DrawBar(char guess); int main() { char solution[8]; //holds solution char blank[8]; //holds "*"'s for unsolved …

Member Avatar for KRal
0
185
Member Avatar for maverick405

I just want to know what does the below mentioned function means? [CODE][COLOR="Green"]void swap(char& a, char& b)[/COLOR][/CODE]

Member Avatar for mrnutty
0
76
Member Avatar for Ryujin89

I am probably well on the wrong path with this one which is why I can't get the program to compile in the slightest. The assignment instructions are : [quote]The Frozen Tongue Ice Cream Shop sells six flavors of ice cream: chocolate, vanilla, strawberry, mint, rocky road, and mocha. The …

Member Avatar for Ryujin89
0
147
Member Avatar for Deadmon

Hello all, I'm trying to parse a file, but for some reason, getline is combining my two letter words with other words. Here is the portion of code I'm working with: [B]note[/B]: my program will always ignore the first word in a line [CODE] char line[256]; string word; char *line2=new …

Member Avatar for sfuo
0
102
Member Avatar for rafta

here is my codes basicallysorting works but now i have to set a counter to display out the contents of array1 and array2 each pass of the sort. the problem is where to put that counter???? [CODE]#include <iostream> #include <iomanip> using namespace std; // Function prototypes void showArray1(int [], int); …

Member Avatar for rafta
0
268
Member Avatar for plobby

I am working on some homework right now and the program has to return two specified values depending on the key value the user enters. I only had to write the bottom portion of the program as the top portion was given to me as a shell. It runs but …

Member Avatar for plobby
0
127
Member Avatar for mybluehair

Long story short, I'm using curl to download a file off my site. I've done tests and successfully downloaded a few txt files. The main point, though, is to download an exe file. So I uploaded the exe file to my site, and downloaded it straight from my browser with …

Member Avatar for GhostfromTexas
0
94
Member Avatar for itzaaron

Okay where should I begin.... I have this rather asinine program that as of right now only asks the user what quantity of dollars and particular coins they have then just spits out what was imputed. I need to add in a 'child' class that does all the following -Add …

Member Avatar for itzaaron
0
304
Member Avatar for debugdom

Hi- I'm really new to c+ (this is day two) and I'm trying to write a program that will allow me to write audio data from a wave file into two arrays for the left channel and the right channel, i've pieced together this code so far and its definitely …

0
49
Member Avatar for daviddoria

Say you have a class that has members [code] private: double a,b,c,d,e,f,g,h,i; [/code] You can make an accessor like: [code] double operator[](int index) { if(index == 0) return a; else if(index == 1) return b; else if(index == 2) return c; } [/code] But how would you do something like …

Member Avatar for Narue
0
96
Member Avatar for Kaotic07

Hello again, I'm having trouble with a program that I have to write involving classes and arrays. Essentially i have to create a class Theater, which I am not sure how to do. The theater has 15 rows with 30 seats per row, and each row is assigned a price …

Member Avatar for Kaotic07
0
107
Member Avatar for duke.tim

this is a simple example of a problem I have been having with differing programs, i am using linux ubuntu 9.10 and codeblocks 8.02 . this is the code [code] #include <iostream> using namespace std; int main() { int hiya; cout<<"hello world \n"; cin.get(); cout<<"enter a number \n"; cin>>hiya; cout<<"you …

Member Avatar for Nick Evan
0
261
Member Avatar for maverick405

I wonder if anyone can tell me how the code tags works? As per my understanding does it works like: [CODE]MY CODE HERE.....[/CODE] for the enitre block of code? or I need to do this for every line of code?

Member Avatar for maverick405
0
228
Member Avatar for nunchuckie

Hi, I've just started with c++ and I have no clue how to do this. Right now I have a code that just printing out the text lines in my file and how many lines there is just to check that i can read from my file... But what I …

Member Avatar for rahul8590
0
137
Member Avatar for FrozenSnake

I decided to try Visual Studio 2010 express Beta 2. This code works fine on my other computer that uses Visual Studio 2009 Pro. I am going to make a Timer that count down from a fixed time depending on foodsource. But first this code need to work :P so …

0
61
Member Avatar for abdelhakeem

Hello All ,This is me again :icon_mrgreen: I'm Making a programme which tell the user to input the name of the product he wants to show its Price and Amount ,but i have a problem: Here's The Code [CODE] #include <iostream> #include <conio.h> using namespace std; struct Shop { int …

Member Avatar for abdelhakeem
0
105
Member Avatar for SagarSonu

Hello All, I am creating the array of size: 26627664 bytes then convert the byte to char array. While deleting the array i got an code gaurd log error that Bad Parameter. I am doing like this Char* pBuffer = (Char*)new BYTE[26627664]; and deleting like this, if(pBuffer != NULL) delete[] …

Member Avatar for Narue
0
108
Member Avatar for maverick405

The code below runs fine but I want some help how can I get output of my original input and reverse of that i.e. ABCDE Z. WXYZ ---> EDCBA .Z ZYXW The below is the code for this. [CODE] #include <iostream> #include <cstring> using namespace std; void swap(char& a, char& …

Member Avatar for Narue
0
82
Member Avatar for abdelhakeem

Hi all, This is me again ,I want to learn programming in ASP.NET using C++ I've installed the IIS ,and made an .aspx file with the following code: [CODE]<%@ Page Language="C++"%> <html> <head><title>Welcome!</title></head> <body> <p align="center"><font color="RED" face="Snap ITC" size="12pt">Welcome to your New ASP.NET Page <br> "Using C++"</font></p> </body> </html>[/CODE] …

Member Avatar for abdelhakeem
0
197
Member Avatar for tarakant_sethy

Hi, some time back i faced question like this. we ca use factory design using factory desing implementation. we can do the same using the shared laibrary, like we will have a static function in the shared laibrary which will be returning pointer to base class object. what is the …

Member Avatar for Narue
0
69
Member Avatar for Ponomous

so i guess there must be some sort of an error in my logic but on line 119 i started a counter that only goes up when a pair is made in the game. Since there are a total of 8 pairs, i set that when the counter is 8 …

Member Avatar for Ponomous
0
120
Member Avatar for new programer

Hello everyone; I did a program using arrays -for the first time- I've got errors, I fixed some and there are others left that I couldn't straighten any help is highly appreciated here is the code : [CODE]# include <iostream> # include <iomanip> using namespace std; int read_car (int cars[], …

Member Avatar for Intrade
0
93
Member Avatar for thebeast91

I have been writing a program using arrays and strings.Here is my question. A class of students takes a 20 question multiple-choice exam;each question has 5 choices(a,b,c,d,e)only one of them are correct.In "tests.dat"Each record of which consists of a student id, followed by a blank, followed by students 20 responses. …

Member Avatar for thebeast91
0
103
Member Avatar for EngneerNitemare

Can someone please explain the concept behind bubble sorting a vector step by step? I know this is a tedious task so whoever answers I will much appreciate it! :) Questions: 1.) What variables are being used? 2.) How and where is the function placed? 3.) Where and why are …

Member Avatar for Nick Evan
0
58
Member Avatar for Tales

I'm making a project in Visual studio 2008. The details of the project are: - It is a MFC Application - The application type is Dialog based with Use HTML Dialog enabled - The project style is MFC standard and... - The use of the MFC is in a shared …

Member Avatar for Tales
0
231
Member Avatar for simplyscottif

Design a PhoneCall class that holds a phone number to which a call is placed, the length of the call in minutes, and the rate charged per minute. Overload extraction and insertion operations for the class. Overload the == operator to compare two PhoneCalls. Consider one PhoneCall to be equal …

Member Avatar for simplyscottif
0
221
Member Avatar for xtian3

this is the output when enter 1 *********O* when enter 2 ********O** ---------------------------- 1*********O* 2********O** 3*******O*** 4******O**** 5*****O***** . . . . . . . help me plss tnx

Member Avatar for donaldw
0
188
Member Avatar for bigmaq

So i need help figurin out where my segmentation fault is comin from. Im not even close to finishing this program but i was just testing my progress so far to make sure that it was taking values correctly, but sometimes the program doesnt stop when its supposed to and …

Member Avatar for bigmaq
0
94
Member Avatar for ylchen

Hi all, I'm new to working with C++ (I'm more a C programmer) and I have a question: I have a container class for a templated type T, which could be any scalar type, although the most commonly used ones are unsigned char and float. I have a function that …

Member Avatar for Ancient Dragon
0
2K

The End.