- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 9
- Posts with Upvotes
- 9
- Upvoting Members
- 8
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Your best friend.
- Interests
- AI, sleeping, American comics, Japanese animation, football (soccer), video games, and hard rock music.
- PC Specs
- Macbook Pro 4,1 Mac OSX: Snow Leopard, Windows 7 Professional
Re:
Hello. I am a beginner. I have searched the past threads, but I haven't found any help. My assignment says to write a function to swap 2 values using pointers. Write a main function that inputs 2 numbers. Have it call the swap function if the numbers are NOT in … |
|
Re:
How should i implement the very basic singly linked list in C++, i am having a paper in just 20 days and i dont know a bit about this stuff,,, How to add data to it ,, as there is only one data item in single linked list and one … |
|
Re:
Hello guys, I've tried searching the internet on how to cout a struct in an array via a binary search, but with no success. I've only learned how to do a linear search and I sort of understand how to do a binary search but: how do I cout the … |
|
Re:
I am trying to delete the array element that matches with the user input. So I am trying to shift all the cells after the deleted one to the left 1 spot. I know it's still in the loop of the if statement(line 11 and 31) but I can't figure … |
|
Re:
Hello Guys! I need help for an assignment. Somehow my code will not correspond to what I'm looking for. I'm having a hard time to find what the problem is. If you guys can please help me, I'll be more than appreciate !!!!! [I]1) Create a program that will read … |
|
Re:
hello i have my code here and i want to add two numbers together constantly #include <iostream> using namespace std; int main() { int a = 10; int b = 10; cout << a+b; return 0; } how to make A+B add constantly? |
|
Re:
this code is for bring an output of "Hello, [name]!" with frame on its outside. [CODE]//ask for a person's name, and generated a frame greeting. #include <iostream> #include <string> // say what standard-library names we use using std::cin; using std::endl; using std::cout; using std::string; int main() { // ask for … |
|
Re:
I need help getting through a class I have to take. I know basics but need help with some of the more complictaed issues. For me that is arrays, classes, stacks, and so on. If someone is willing to help I would appreciate it. I could use some more personalized … |
|
Re:
I am trying to get my code below to display what high school the students are from from the .txt file the text file below will work but i want to add school to txt file and confused on what to change in my code [QUOTE]Alphy Beta 85 83 77 … |
|
Re:
Consider the following selection statement where X is an integer test score between 0 and 100 Declare X as an integer Write āPlease enter a number between 0 and 100.ā Input X If (0 <= X and X < 49) Write "You fail" Else If (50 <= X and X … |
|
Re:
Hello All, I am having a problem making my program display and output correctly. When i run my program my count will display but my word will just give me some kind of line. Can you please help me correct this? Thanks Ronnie [CODE] #include <iostream> #include <string> #include <iomanip> … |
|
Re:
[CODE] #include <iostream> #include <vector> #include <string> using namespace std; class Member { public: string Name,Vorname; //prototypes vector<Member>*generateAVector(); void SaveElementsInTheVector(vector<Member>*pAVec,Member *obj); void DisplayTheVector(vector<Member>*pTheVec); void test(); }; int main() { Member Neu; //new object //creates a vector on the heap, here with no sense,only experimentally vector<Member>*pAVec=Neu.generateAVector(); //puts data in the elements … |
|
Re:
Just wondering, how high can c++ really count? Because I made a fibonacci program, and it starts acting weird and printing negatives at about 10-11 places. With both long, and int variables? Is it impossible to count higher? If not, how? |
|
Re:
ok i try to write a linked list of objects from one class here is the the class: [CODE] class detail{ int code; string unit; string name; float price; public: detail(int c, string u, string n, float p); int get_code(){return code;}; string get_unit(){return unit;}; string get_name(){return name;}; float get_price(){return price;}; … |
|
Re:
void Sort(string [][2],int,char direction='A'); What does the char direction = 'A' mean? |
|
Re:
Ok so i have trouble with looping with while and for statments heres the questions: 1. Write a program that gets a positive integer from the user and prints all the numbers from one to that integer. If the inputted number is zero or negative, then the program will print … |
|
Re:
I've created a list of strings and load a text file in it. once list is created, the program have to read it, do something and write results in a new text file. [CODE] ofstream f; f.open("filename.txt"); string key; list<string> text; static char ALPH[21] = {'A','B','C','D','E','F','G','H','I','L','M','N','O','P','Q','R','S','T','U','V','Z'}; int* index_t = new … |
|
Re:
Can someone help me I keep getting an error code on this line and I cannot figure it out. cout <<"Encrypted digits:"; << digit_three; digit_four; digit_one; digit_two; << endl;// display encrypted numbers ________________________________________________________________________________________ #include <iostream> // required to perform C++ stream I/O #include <iomanip> // required to perform setprecision stream … |
|
Re:
Here's the problem: Write a program that produces a bar chart show the population growth of Prairieville, a small town in the Midwest, at 20-year intervals during the past 100 years. the program should read in the population figures (rounded to the nearest 1000 people) for 1900, 1920, 1940, 1960, … |
|
Re:
I've made a simple function that takes a vector as an argument. If the vector is empty, it throws a domain_error (I've included stdexcept). I'm feeding it an empty vector from the main loop just to learn try...catch statements and when it catches the error, it's supposed to print something … |
|
Re:
I am having some issues with my project. This is homework and I am not looking for answers, just some help. I am to create a RationalNumber class that takes two rational numbers (fractions), reduces them, and I am then supposed to use overloaded operators to add, subtract, multiply, and … |
|
Re:
Hello, I have a problem with my program that I canĀ“t figure out. I would appreciate if someone could give me some hints on what to do. I am trying to write a program that checks how many random numbers less than a positive integer N one should generate before … |
|
Re:
I have an input file that i make into a string, it looks like this "1+2+3+45*5*2" My problem is when i print the string it always prints as single characters instead of 45 i get 4 5, how do i fix this. heres a small piece of the code. [CODE] … |
|
Re:
I want it to say "You are correct!" when the number they guess matches the random roll but it just keeps saying this when I type in 6 as my guess, how do I fix it? This is what I wrote in the main: [CODE] int num; int die; cout … |
|
Re:
[CODE]#include <iostream> #include <string> #include <windows.h> using std:: cout; using std:: cin; using namespace std; int main() { unsigned long n; char Answer; string mystr; do { do { cout << " What is your name? "; getline (cin, mystr); cout << "Hello " << mystr << ".\n"; cout << … |
|
Re:
Hi, I wrote this code to add 10 numbers and find their average. It will not out put average. What am I doing wrong? Thanks for the help. [CODE]#include <iostream> using namespace std ; int main ( ) { double Sum; double Average; double Numbers[10]; int K; Sum = 0; … |
|
Re:
hey guys, just wondering how I can change this code to C++... It's an old code my brother actually made! [CODE] #include <stdio.h> const int ROW = 4; const int COL = 13; int main(void) { int i, c, max = COL; for(i = 0;i<ROW;i++) { for(c=0;c<COL;c++) { if(c == … |
|
Re:
HEY im pretty lost i need to make a program where user has in enter a name and after it has been entered it has to repeat the name 100 times can someone please help me im fairly new and i cant get it to work =/. this is what … |
|
Re:
So I've never worked with percentages in c++ and I was wondering how to incorporate into a program I'm making for a game so see what the chances are that an item will reach a certain level depending on the chance of success for each different level. Here's what I … |
|
Re:
hey guys i got one more question :O i have this code for a class function [CODE] void Platform::set_clips(SDL_Rect platClip[], int i) { for( int j = 0; j < i; j++ ) { platClip[j].x = 0; platClip[j].y = 0; platClip[j].w = random_number_w(); platClip[j].h = 5; } } [/CODE] is … |