- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 20
- Posts with Upvotes
- 18
- Upvoting Members
- 14
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 3
Re:
I do not know why when I compile it, on why does the last cylinder file print out multiple times int tags1 and tags2. I bolded them so you would see what I am talking about. Could someone please help me out? [CODE]#include <iostream> #include <fstream> #include <iomanip> #include <string> … |
|
Re:
Hello, I'm writing a plugin for a software in eclipse. I'm using vtd-xml.jar for importing an xml file. I have added to the build path by rigt clicking on the paroject and selecting the opetion add to build path. While I do the operations from eclipse it is working fine … |
|
Re:
I thought i would share this with the community wrote most of it in school but the ai i wrote at home enjoy! |
|
Re:
I need to create a program that uses a structure that alocates memory with the new operator. The information must be saved in a file, then displayed. The problem I have is that the program saves only the first character of the words I enter. Could someone please help me … |
|
Re:
Hi, I have a large array of values and would like to find a way to calculate the change in value for each period. I have been attempting to use a for command with an array to do this, but I have not been successful at all. The basic idea … |
|
Re:
I am having trouble with this part of my program assignment. I have created and compiled the three separate implementation files that design the three classes, they each have a default constructor, overloaded constructor, and a display function. //************************************************************************************************************ "When your program is working correctly, define an array of pointers … |
|
Re:
#include<iostream> using namespace std; #include<string> #define INT_MAX 100000 #define INT_MIN 0 using namespace std; class Automobile { public: Automobile(); void read(); bool is_cheaper_than(??????) const; bool better_mileage_than(???????) const; bool better_finanace_than(??????) const; void print() const; private: string name; float price; float mileage; float finance; }; Automobile::Automobile() { name=" "; price=INT_MIN; mileage=INT_MAX; } … |
|
Re:
I'm getting an error with this code. Both the findMax and findMin lines in main say "Invalid conversion from 'int' to 'int*'". What does it mean? #include <iostream> using namespace std; int findMax(int[],int); int findMin(int[],int); int main () { int max, min, x; findMax(max,x); findMin(min,x); return 0; } int findMax(int … |
|
Re:
Hi Folks, Here is another noob question. I am trying to write a simple predicate for the find_if function in STL. Here is my code #include<iostream> #include<vector> #include<algorithm> #include<iterator> using namespace std; class InRange{ const int& low; const int& high; public: InRange(const int& l, const int& h): low(l), high(h){} bool … |
|
Re:
please tell what am I doing wrong. #include <iostream> using namespace std; int main() { char name[3][30]; int i, j; for(i=0;i<=2;i++) { cout << "Please enter name: "; cin >> name[i]; } for(i=0;i<=1;i++) { for(j=i+1;j<=2;j++) { char temp; if(name[i] > name[j]) { temp = name[i]; name[i] = name[j]; name[j] = … |
|
Re:
Hey everybody,it's the c++ creator.I am a beginner at C++,and am getting confused at functions.I am learning from a site called cprogramming.com and this is what they say- [QUOTE]Lesson 4: Functions (Printable Version) Now that you should have learned about variables, loops, and conditional statements it is time to learn … |
|
Re:
[size="4"][size="3"][font="Tahoma"]These are just some of the Arrays sizes i've used, many of them are inside a loop. [CODE] int ss[80000]={0}; char pres[64000]; int ith[4096][16]={0},ich[4096]={0},pres2[2500][16]={0}; int slf[4096][16]={0},slr[4096]={0},rh=0,crs[4096]={0},cri=0,moo=0,nb=0; int qlf[4096][16]={0},wlf[4096][16]={0},kd=0; int jlf[4096][16]={0},jlr[4096]={0},jrs[4096]={0},jri=0; int klf[4096][16]={0},klr[4096]={0},krs[1204]={0},kri=0; int vlf[4096][16]={0},vlr[4096]={0},vrs[4096]={0},vri=0; int plf[4096][16]={0},plr[4096]={0},prs[4096]={0},pri=0; [/CODE] 80% of the time my program runs properly but every other time it … |
|
Re:
I am trying to rebuild my code for my final project due in 2 hours... I am getting a stray \147 and 148 error, along with various other errors. What am I doing wrong???? I am not very good at this C++ stuff, so any help would be appreciated :) … |
|
Re:
I have a homework question that instantiates 4 node pointers, *p, *q, *r, *t, and the first three have a number, 1, 2, and 3 respectively. I have to draw out (using 'blocks' and arrows) what the memory would look like when these lines of code occur: p->next = q; … |
|
Re:
I have to write a code that accepts 5 grades and sorts them from smallest to greatest using linked list.This is what I have so far using examples from the book. #include <iostream> using namespace std; struct List { int value; List *next; }; int main() { int num, num1,num2,num3,num4; … |
|
Re:
Okay the text on my input file is Wxmv_bpm_xwl_jig_lwwza,_PIT._Q'u_awzzg,_Lidm._Q'u_inziql_Q_kiv'b_lw_bpib. Here's My code but for some reason I can't get my program to convert the message to my output.txt file. Can someone please help thanks [CODE] #include <iostream> #include <fstream> #include <cstdlib> using namespace std; int main() { string str; int … |
|
Re:
Im trying to complete exercises out of a c++ book that does not provide solutions. The first part was to just ask for internet package choice and output the cost of it as well as any additional fees. The part im having trouble with is: "Modify the program to show … |
|
Please tell me how bad this code segment is. I figured I would share this horrible code. If it's not as horrible as I think it is, please let me know. Thanks! [CODE] /* Purpose: Create a function to check the input from user. Only valid integer should be returned. … |
|
I somewhat understand the concept of the parentheses overload when you need to use an object as a function. The question that I have is why does the max variable in the listed code below always input 2. [CODE] /* Purpose: This is the header file of randomInteger.h The class … |
|
Re:
Hey guys! I am new at Class and object things. Before introducing the object oriented issues my life was easier! I wrote these codes here: /*--------------------------------------------------------------------------------------- Source File: OOP4.Henri.cpp Program name: Object Oriented program, Assignment 4 Author: Hassan Aghaei Baradaran (Henri) Compiler: Bloodshd Dev-C++ 4.9.9.2 Purpose: To define and demonstrate … |
|
Re:
the aim of this programme is to create a .txt file (of which the name is specified by the user) of all the items in a certain directory (also specified by the user) the problem is about half way down, the 'mydir' bit [CODE] #include <iostream> #include <fstream> #include <string> … |
|
Re:
Hey everyone, When i try to write any new c++ program and run it, it doesnt even build and a different one runs(the same one runs all the time). I use Quincy. However, any of my old c++ programs work fine, just any new ones that i try to run … |
|
Re:
help i am a beginner and i need help with my final program. i beleive i have everything set but i am not sure how to write the function. i want the function to add up all of the rides and give a grand total but i can not get … |
|
Re:
I have said program: [code] #include <iostream> #include <fstream.h> #include <conio.h> using std::cout; using std::cin; using std::ios; using std::endl; int main() { char first[6]; char middle[16]; char last[16]; int counter = 0; char temp; cout << "Please enter your first, middle, and last name:\n>"; cin.get(first, 6); cin.ignore(80,'\n'); cin.ignore(80, ' '); … |
|
Re:
First let me thank you for taking the time to read this. I've been working on this code for a while and I can't seem to get it to run. Basically what I have to do is take in data from a file then output the data in a report … |
|
Re:
Hello to everybody, I am a c++ beginner, and I want to do a program that reads a file with a column with numbers, "finds" the repeated numbers and write the repetitions on other file. For example, I have a file like this: Input file: 6 5 4 4 7 … |
|
Re:
[CODE]// Listing 14.4 // Add Function #include <iostream> class Counter { public: Counter(); Counter(int initialvalue); ~Counter() {} int GetItsVal()const {return itsVal; } void SetItsVal(int x) {itsVal = x; } Counter Add(const Counter &); private: int itsVal; }; Counter::Counter(int initialValue): itsVal(initialValue) {} Counter::Counter(): itsVal (0) {} Counter Counter::Add(const Counter & rhs) … |
|
First, my program works. I'm posting my code for my own personal benefit with the help of your guidance to know of any better way of handling this code. I was considering the use of [CODE] while(cin >> grabname) [/CODE] to possibly continue grabbing from the input stream until '\n' … |
|
Re:
i write a point class, when i compile , vs2008 give me the warning about" not all control parth return a value" could you please tell how to avoid that? [CODE] double& operator [](int i) //[] which can used as the left value { if(i==0) return x; else if(i==1) return … |
|
Re:
[CODE]#include<stdio.h> #include<graphics.h> #include<conio.h> #include<malloc.h> #include<stdlib.h> #include<dos.h> #include<iostream.h> int k=1, i, user=0, dice=0, x1=50, y1=410, x2=70, y2=410, dir1=0, dir2=0, ch; int cnt1=1, cnt2=1; void *obj1, *obj2, *o1, *o2, *dot, *back, *turn, *ready; unsigned int size; void ladder1() { int m,n; for(m=0;m<=250;m+=250) for(n=0;n<=m;n+=250) { setcolor(DARKGRAY); line(53+m,57+n,55+m,55+n); line(53+m,57+n,133+m,137+n); line(55+m,55+n,135+m,135+n); line(133+m,137+n,135+m,135+n); setfillstyle(SOLID_FILL, YELLOW); floodfill(55+m,58+n,DARKGRAY); … |