49,761 Topics
| |
Hey there, everyone. Here is the question I had to write code for: Include the following code: char test[15] = {‘T’, ‘h’, ‘i’,’s’, ‘_’, ’i’, ’s’, ‘_’, ’a’, ‘_’, ’t’, ’e’, ’s’, ’t’}; for (int row = 0; row < 15; row++) { cout << test[row]; } Add the code … | |
int numberArray [9][11]; write a statement that assigns 145 to the first colum of the first row of this array. write a statement that assigns 18 to the last col of the last row of this array this is what i have [code] numberArrray [1][1] = 148; numberArray [9][11] = … | |
If I have these function variables: int (*f)(int); int (*g)(int); int (*h)(char); why can I do the assingment f=g but if I do h=g the C compiler gives me warning while the C++ compiler gives me an error. Can any one please explain this to me. | |
i wanna put all my variable initialization at a header file.. but after i put in a header file name, "variable.h" i #include "variable.h" in main. but it still cant reconize the variable. what can i do? + extern infront all the variable in header file? | |
I am a beginner I spent many hours studying c++ books and online tutorials, I am sure I am competent enough to become a good programmer but I cant wrap my mind around how c++ (or any programming language for that matter) works. My question is, How do I understand … | |
The following code, excerpted from a much larger program, triggers a C++ compile time error as shown in the leading comments. [Re-]declaring variable 'w' to be a 'const char *' will fix the problem, but I don't know exactly why. I would greatly appreciate it if somebody could elucidate the … | |
Hi I'm working on the following code which is to be used on the M16C/62 microcontroller. Basically the microcontroller is to [B] "scan the keypad and display any key that is depressed" [/B](which i have done im pretty sure), on the LCD. However I know I have to Sound the … | |
[CODE] // filename = isbn.cpp // Kyle Burmark // Prof. Gelotte // 02/12/02 // Program 4 - Validate ISBN numbers program // Description: This program asks the user whether he wants to validate // ISBN numbers from his own input or from a file of isbn numbers // Start program … | |
This is my relatively simple code. Its just part of a memory matching game. I've looked but I cannot figure out why it won't switch the values in each of the array indexes. I would appreciate anyone helping me out here with this. ** Turns out the problem is that … | |
[code] #include <iostream> #include <iomanip> using namespace std; void celsius(int); int main() { cout << setprecision(2) << fixed << showpoint; cout << "This program displays a table of the Fahrenheit temperatures" << "\n0 thorugh 20 and their celsius equivalents.\n"; celsius(0); return 0; } void celsius(int fahr) { double cels; cout … | |
Hello everyone, I am a Mathematics major and my mentor asked me to put together a program that evaluates explicit stencil methods along the difference mesh. Basically I need to use a recursive method to get my value, as I know base values and boundaries, but the C++ experience I … | |
Im trying to make an annogram. first you input a word, and then it mixes it up and then couts the scrambled version of the word. My problem right now is that when you input a word like "Cat", it will mix up and look like "aCt" or something with … | |
Okay, I've been noticing this for a while now and decided I might as well ask. When I'm working on my programs at school, if I try to read from a text file, it can't seem to find the text file. However, if I run the exact same thing on … | |
hey there! ok i need help figuring out what is wrong with my code. i have to write a program that does addition and subtraction in stacking. but all im getting is error. some advice would be greatly appreciated thanks here is the code #include <iostream> #include <stack> #include <string> … | |
Okay, I figured out the larger problem that I've been having with my program, now all I need is it to get out of the loop and finish the program. Well, it won't break out for some reason. Anyone see why? [code]row = col = 4; z = 0; do … | |
I'll try to explain. I've got a C++ program that is going to copy files from it's folder which it is located in to another location. So, I'd say f.x. I had a directory called "Flash". Then, inside that directory would be "myprogram.exe" and 4 other directories. Within those 4 … | |
Ended up solving it don't know how delete post however [code] include <iostream> using namespace std; /* * linkedlist.h * linkedlist */ struct node { int data; node * next; }; class linkedlist { node * hd; public: linkedlist(){ hd = NULL; } void add_to_end(int data) { //find end of … | |
I need a complete help on how to use the flush() member function with ofstream, ifstream and fstream and also its use. P.S: Please provide an example for me to understand | |
Well, I bumped into an interesting C++ problem last night while I was aimlessly surfing the Internet, and, of course, it caught my attention. It said something like this: "From a file it's read a text that contains a phrase, on a line. The program rearranges the letters in each … | |
[code] /* * File: sets.cpp * ------------------ * This program deals with sets of lower case letters. * This program computes the union and intersection of two sets. This program * also checks if set B is a subset of set A and returns true if set B is a … | |
am just a beginner and an getting the compiling error like:(warning: no newline at end of file) anyone who could help me out? [code=cplusplus] #include <iostream> #include <cmath> using namespace std; int main(){ int a; int b; int c; double p; double x1; double x2; cout<<"bitte lesen sie vier nummern … | |
Hi, I'm implementing linear block coding and need some ideas on how to go about storing the cosets. i.e. If i have an alphabet C={000,101,010,111} I need to perform C+000={000,101,010,111} C+001={001,100,011,110} C+010={010,111,000,101} C+011={011,110,001,100} etc... observed here is that there are only 2 sets and it keeps repeating.So, i need to … | |
HI i have a small problem but for some reason i can't think of how to do it. I'm making a linear linked list of arrays. The Array is of travel class object. So in the struct node, how should i implement so that the size of the array is … | |
Hi all I urgently need a tool that either convert java code to c++ or make reverse engineering diagrams of java code..like uml/sequence digs..etc…or explanation of the code…. If anyone have idea of such a tool then let me know please. Regards | |
My assignment is to take in values that will create a maze, and then let the user traverse the maze by use of a stack to store values. I thought I had it down to it working, but now it isn't doing what it should and then it stops after … | |
You are supplied with a group of implemented sorting algorithms (posted file sortTest.cpp). You may not change the prototypes or any of the provided code. You will add a main program to use the functions you are given. You will also add one additional function VerirySorted. This function will take … | |
Hi guys im getting some errors here and cant seem to find why? [code] #include <iostream> #include <iomanip> using namespace std; class Student{ public: Student (Mary, 100, 99, 88, 1); void getInfo(); void showInfo(); private: string name; double test1, test2, test3; int idNum; }; Student::Student (string n, double t1, double … | |
i am programming in microsofts visual C++ forms program i am a very beginner. lol but i have the main design that i want but. i would like to add functionality to the url box, the go button, and the forward and backword buttons. could somebody please help me i … | |
[CODE=cplusplus]// CS 210 EDDIE CHEN // THIS IS PROGRAM 4 (ISBN-Check), a program that verifies ISBN. #include <iostream> #include <fstream> // REQUIRED FOR FILE STREAMS #include <cstdlib> // FOR DEFINITION OF EXIT_FAILURE #include <cctype> #include <string> using namespace std; // ASSOCIATE STREAMS WITH EXTERNAL FILE NAMES #define inFile "isbntest.txt" // … | |
Hey, im trying to print what is stored in my 2d dynmic array from a file in my print function. However whenever i try to access information in the array, it crashes the program. maybe the array is not being passed back some how, im not sure, any information would … |
The End.