49,761 Topics

Member Avatar for
Member Avatar for vulcano224

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 …

Member Avatar for griswolf
0
3K
Member Avatar for nerdygirl118

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?

Member Avatar for Ancient Dragon
0
88
Member Avatar for hasanzia

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 …

Member Avatar for kes166
0
1K
Member Avatar for rico001

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 …

Member Avatar for rico001
0
190
Member Avatar for crodriguez08

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 …

Member Avatar for hag++
0
207
Member Avatar for usustarr

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 …

Member Avatar for gerard4143
0
180
Member Avatar for enja

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 …

Member Avatar for enja
0
94
Member Avatar for Efficience

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 …

Member Avatar for Efficience
0
574
Member Avatar for climberboy

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 …

Member Avatar for Ancient Dragon
0
212
Member Avatar for awadojag

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 …

Member Avatar for mayyubiradar
0
157
Member Avatar for naz arif

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 …

Member Avatar for naz arif
0
83
Member Avatar for patito

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 :)

Member Avatar for RVNJIK
0
735
Member Avatar for Hatem Faheem

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 …

Member Avatar for Hatem Faheem
0
105
Member Avatar for askhari139

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"); …

Member Avatar for Fbody
0
118
Member Avatar for Finarfin34

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!

Member Avatar for Rishikeshan
0
87
Member Avatar for sundip
Member Avatar for DGeneral

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 …

Member Avatar for Fbody
0
9K
Member Avatar for aviavyne

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, …

Member Avatar for spirit of love
0
1K
Member Avatar for djhog

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; …

Member Avatar for Ancient Dragon
0
107
Member Avatar for Kosithc

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) …

Member Avatar for Ancient Dragon
0
200
Member Avatar for afizaex

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]

Member Avatar for afizaex
0
132
Member Avatar for mitrious

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 …

0
67
Member Avatar for MothershipQ

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 …

Member Avatar for gerard4143
0
133
Member Avatar for Newtype

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 …

Member Avatar for Newtype
0
167
Member Avatar for need

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++] …

0
71
Member Avatar for DanielWuVB

can somebody tell me which book for beginner in C++ .... I have some background in VB6 in old time ... Thanks !

Member Avatar for DanielWuVB
0
128
Member Avatar for Meleeruler

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 …

Member Avatar for Meleeruler
0
256
Member Avatar for TinhornAdeniyi

[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 …

0
80
Member Avatar for newbiecoder

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> …

Member Avatar for newbiecoder
0
159
Member Avatar for it-lady

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 …

Member Avatar for it-lady
-1
99

The End.