49,761 Topics
| |
I have to do a simple program for school I was wondering if anyone can please to help me. I already created the program but it is not working properly and I have no idea how to fix it. Everything looks fine to me Here's the assignment Write a program … | |
Function arguments and parameters are paired by name, therefore, names of corresponding arguments and parameters must be identical. Why is this statement false? Also, in cin.ignore (200, '\n'); why is the 200 there? what does it do? | |
I am a beginner & I need to implement this program which states that I have to reverse whatever is given in input via pointers... For Example: i) Input: This is reverse order program Output: program order reverse is This ii) Input: This is exercise eight Output: eight exercise is … | |
Hello I was trying to compile programs using DevC++ for Windows, (I also looked at WxDevC++) I can get generic console apps I made in C++ to compile under windows. What I want to be able to do is compile some opensource programs that use make to compile. When I … | |
Hey there, I can't seem to figure out why i can't access the member '*next' from the Node class to the Shuffle function. Any help would be great. [CODE]/* llist.h * LList */ #include <iostream> #include <string> using namespace std; typedef string ElementType; class LList; class Node { protected: ElementType … | |
I have following code that execute .ksh successfully. My issue is, after executing ksh script, it does not return to C++ program to do my print. Therefore "ksh was executed" never gets printed. Can someone please show me what I need to do to make program comes back after executing … | |
i have to create a game using c++ language n i want to create something new...so i decide to create a games name "don't forget the lyric" which is the user need to fill in the blank on the lyric given. so, my question is how can i random the … | |
Hello Everyone , I've this strange problem with using char pointer in my c++ programme with the gcc compiler (version 3.4.2). [code] char a='A'; char *c=&a; printf("%p %c\n",c,*c); std::cout<<c<<" "<<*c<<std::endl; [/code] I expect the output of printf and cout to be same but why am I getting strange output like … | |
I just wandered if there is a way to constantly update the time once it has been displayed on a console application. I am using the following code to display the time: [CODE]time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); printf ("The … | |
I'm working with a program where the user adds a few names together with the age. After this the program will write out the content of the text file. I'm having problems seperating the names and age into different variables. I want the program to put word nr1 in char … | |
this is the code i have written so far....its in c++....i need ur help....i can't find errors...:( class Matrix { private: int rows; int cols; float *pData; public: int getrows(){return rows;} int getcols(){return cols;} void setrows(){rows=r;} void setcols(){cols=c;} private: void doCreate(); void doAdd(Matrix m); void doSub(Matrix m); void doTranspose(); void … | |
hi to all, can anyone help me writing a program that can set a pin of the serial com1 port at 12v+? it must be simple command line based,for example, program.exe -on or -off. any pin will work. thanks in advance :) | |
Hello everybody, I'm hatem faheem a student in Cairo university , Faculty of Engineering , Computer departement I have a question in the C++ string class constructor <string> that's the code [CODE] #include <iostream> #include <string> using namespace std; int main() { string s0 ("Initial"); string s1 (s0,3); string s2 … | |
can we put the restriction on some function of the loop variable in the loop conditions like the for loop in the following program #include<iostream> using namespace std; int main() { int a,size=2,b[size],i; cin>>a; b[0]=1; b[1]=1; cout<<"The fabbonacci sequence is:"<<b[0]<<" "<<b[1]<<" "; for(i=2;b[i]<=a;i++) { b[i]=b[i-1]+b[i-2]; size++; cout<<b[i]<<" "; } system("pause"); … | |
Hey guys! I wrote a program in c++ when I want to run it it says unable to start program 'c:\users\pc\documents\visual studio 2008\projects\proje1\debug\projem.exe system cant find specified path. But I checked and there is this path and files. What could be the reason? Thanks in advance! | |
Please post this on HTML thread. | |
Hello, I want to write a program that reads a text file, which contains a table of data where the columns are separated by spaces, and store each column in different arrays with different data types. For example, let's say I have the following data: 1 hello 1.5 2 world … | |
Hello, I recently started taking classes in c++, and one of our assignments is to create a program that converts Fahrenheit to Celsius degrees. I was able to do so, however I want to make the conversion part into a subprogram, I have some idea on how to write it, … | |
Need to sort an array of objects of type PhoneEntry, using PhoneEntry's greaterAlpha to do your comparisons. I have the sort function, but I'm not sure how to get everything working together. [CODE] #include <iostream> #include <string> using namespace std; class PhoneNumber { private: int area; int prefix; int suffix; … | |
Hello, I am using this piece of code for allocating 3D array in memory by my dimensions HEIGHT, WIDTH, DEPTH which are variables. [CODE]p2DArray = new double**[HEIGHT]; for (int i = 0; i < HEIGHT; ++i) { p2DArray[i] = new double*[WIDTH]; for (int j = 0; j < WIDTH; ++j) … | |
This Array topic I had many problem, someone help me? Thank you! [IMG]http://i291.photobucket.com/albums/ll311/afizaex/Awam/IMAG0001.jpg[/IMG] [IMG]http://i291.photobucket.com/albums/ll311/afizaex/Awam/IMAG0002.jpg[/IMG] [IMG]http://i291.photobucket.com/albums/ll311/afizaex/Awam/IMAG0004.jpg[/IMG] | |
The execise in the books asks this: Design and implement a program to produce a permuted index. A permuted index is one in which each phrase is indexed by every word in the phrase. And says: A good algorithm is suggested in The AWK Programming Language by Aho, Kernighan, and … | |
I have a 200 point program to write for school that says how much extra grain will be left in the silo and Tomorrow is the last day to turn it in. But something is wrong with my while loop. Could you help me out? Also, I'm writing this code … | |
Write a short program that takes an integer value (call it n) from the user and prints out a triangle composed of O and X characters. For example, if the user enters 3 as the input, your program should print out: O OX O X O If the user enters … | |
Hello, The program finds the shortest path between the user inputted nodes. The nodes are integer. Now I need to modify my code to find the path between nodes which are string. Path between A and B instead of 1 and 2. Please help me to convert my code. [code=c++] … | |
can somebody tell me which book for beginner in C++ .... I have some background in VB6 in old time ... Thanks ! | |
Alright, here's a problem I can't seem to figure out. I'm very new at all this, so hopefully this problem isn't too ridiculous. Basically the gist of it is in a program I made for a class; it wouldn't let the input for the cin.getline be typed unless I put … | |
[CODE][/CODE]ok this code has a few quirks that is annoying me the only part that does not straight up work is the Add a show i have a problem in increasing the size of the array. there is also the issue of couting two zeros for the minutes of the … | |
I took these codes from Deitel's book directly, I tried them at both Linux gcc and Codeblocks on Windows and they both gave errors. Can you tell me why I am getting these errors? Am I doing a mistake by compiling them? Here is the code: new.cpp: [CODE] #include <iostream> … | |
Analysis of algorithms is a form of mathematics. Consider the following problem: • We assume that a pair of squirrels has a pair of children every year. • These children are too young to have children of their own until two years later. • Squirrels never die. (The last assumption … |
The End.