49,761 Topics

Member Avatar for
Member Avatar for lrnzsmok1

Can anyone help me with this program?? Professor asked me to create a program that permits a user to enter a maximum of 50 characters into a stack Object, then have the program sort the stack contents into increasing order from A to Z. Is there any way i can …

Member Avatar for kbshibukumar
0
132
Member Avatar for XMarshall

Hi, Can anyone pls let me know the reason as to why do STL - [B]Container Adaptors[/B] types do not support the use of [U]iterators[/U] for iterating through their elements? Thanx

Member Avatar for jencas
0
46
Member Avatar for homeryansta

[CODE] ifstream inputfile; cout << "enter the name of the file: "; cin >> filename; inputfile.open(filename); string temp; int i = 0; while(filename != NULL) { while(isalpha(filename)) { temp[i++] = filename; } if(i > 0) { insert(temp, 1); i = 0; } } [/CODE] this is my code, what am …

Member Avatar for homeryansta
0
126
Member Avatar for Duki

I have an assignment question that says "Decide whether the [I]syntax[/I] of the following statements is valid or invalid." These are the statements: [code=c++] a) listData->next = ptr1->next ; b) listData->next = *(ptr2->next) ; c) *listData = ptr2 ; d) ptr2 = ptr1->next->info ; e) ptr1->info = ptr2->info ; f) …

Member Avatar for Duki
0
98
Member Avatar for JAGgededgeOB172

Hi all, The program I'm making needs to basically interpret long math operations (see the attached text file) and compute them. Simple right? I have to use stacks and queues to reorder the operation into the desired output (the output will compile properly if you run the program as it …

Member Avatar for cikara21
0
134
Member Avatar for number87

I did a program to read the output of the UNIX command ls -ali and count the number of directories, write files, link files etc. But there seeems to be something wrong with my code and I cant compile it. I cant seem to find out whats wrong with it. …

Member Avatar for death_oclock
0
126
Member Avatar for TheBeast32

Hi, I'm making a program that will get input from a user's microphone, send it to another user with a socket, and play it. It's like a VoIP thing. I can send data using a socket, but I have no idea how to get input from a microphone or play …

Member Avatar for nmaillet
0
53
Member Avatar for rosenberg_a

I have a problem in the book (not for homework) that says. List Reverse Modify the linked list class you created in the previous programming challenges by adding a member function named reverse that rearranges the nodes in the list so that their order is reversed. Demonstrate the function in …

Member Avatar for rosenberg_a
0
344
Member Avatar for hockeygoalieguy

Hi. I've been trying to find out how to use Gui in C++. I use Bloodshed Dev.-C++ and so far I haven't found anything on how to do it. Could someone please help?

Member Avatar for Freaky_Chris
0
165
Member Avatar for drjay1627

hey, given one side and an angle how do you calculate the other sides and angles in a right angle triangle in c++. I'm basically looking for an algorithm. Thanks drjay

Member Avatar for StuXYZ
0
110
Member Avatar for makimbo

Hi! I wrote this program to generate a keyboard determined random numbers. [code] #include <stdio.h> #include <stdlib.h> #include <time.h> int amount, aleatory_numbers; int array[70]; int counter=0; int generator () { printf ("Introduce the amount of numbers that you wish: "); scanf ("%d", &amount); srand ( time(NULL) ); do { aleatory_numbers …

Member Avatar for StuXYZ
0
109
Member Avatar for winrawr

I'm trying to use new but I can't seem to get it right... in this example I ask how many strings the user would want to input, then ask for each one, then echo them back. [code=c++] #include<iostream> using namespace std; int main(int argc, char** argv){ int num, i; char** …

Member Avatar for Freaky_Chris
0
130
Member Avatar for xtremerocker

My program needs to use exponents, however, double does not allot enough space for my numbers, is there another way to use the pow(x,y) function or is there another function for exponents that I'm overlooking? [CODE=cplusplus] #include <iostream> #include <cmath> using namespace std; int main(void) { int thresh = 10000; …

Member Avatar for xtremerocker
0
214
Member Avatar for winrawr

I'm trying to write a class that will read and organize the command line arguments of a program. Like, it will read -a as a 'switch', and --abcd as a 'switch' and you can define different switches as having parameters, so -a bc de fg will have bc and de …

Member Avatar for winrawr
0
103
Member Avatar for Gaytri Khanna

Why we use main() function in c and c++? please reaply as soon as possible.

Member Avatar for Salem
0
80
Member Avatar for NexusX

I'm trying to read a single letter from the beinging of a string that is generated from user input. Though it sounds childishly easy, I think I may seriously have a heart attack from trying to solve this problem. Example code follows: [code=CPP] #include <iostream> #include <string> #include <sstream> #include …

Member Avatar for WaltP
0
2K
Member Avatar for FrancisC07

hi guys..! i need some help on how can i print out the output of my program.. the problem is, it will only print out the first char of a characters and i don't know how to use the pointer using an multidimensional array. ex. input: jhonny output: j here's …

Member Avatar for zalezog
0
133
Member Avatar for booker

Hello everyone I am new to the forum I have a question. I created a method foo(ifstream &myfile) and works only if executed ones. In a loop or consequtively calls make the cerr call [code]int foo( ifstream &infile){ if (!infile) { cerr << "Unable to open file "; return -2; …

Member Avatar for vmanes
0
76
Member Avatar for massivefermion

Hello I wanna ask is it possible to to us vb for building a program's GUI and c++ for its coding?

Member Avatar for vmanes
0
170
Member Avatar for bclark8923

For a class project we are to implement four types of sorts that they give us, and for the most part i have that working, but i wanted to know what would be a good data structure to use? Atm im just making an array, if it fills up, i …

Member Avatar for h3xc0de
0
103
Member Avatar for tones1986

Hi All, I am working on a project and have come across a slight problem. I have a file i am reading in that consists of the following: John Smith 333222333 01/01/80 M z11119 cs111 2008 fall a cs222 2009 spring f The first line is the Students information, the …

Member Avatar for tones1986
0
238
Member Avatar for reaven

Hi am trying to make a simple application that write and read from and to a text file the problem is that i want to be able to aerch in the text file for an specific line. the text file is a list of words with a meaning each word, …

Member Avatar for Comatose
0
240
Member Avatar for mikhala99

This is homework and I am using a getfile that is just a 5 row 4 column list of numbers. I can get this program to compile and when I go to run it, I get my cout text output but without my numbers and the program crashes. I am …

Member Avatar for mikhala99
0
125
Member Avatar for telemachos9

Hello, I'm relatively new to c++, so I would appreciate any help. This must be a very basic issue, but how is it that one can assign a stuct or class member to a pointer instead of that structs or class member's address (via &)? (from stroustrup) [code] struct name{ …

Member Avatar for telemachos9
0
98
Member Avatar for slobo_n

Hi all. I have just started using Qt, and i can't find any primer on how to connect my Sql Server2008 database. What are the steps that i need to make, so my database is connected with Qt. Additional info: I'm using Qt 4.4.3 open source on Windows XP and …

Member Avatar for h3xc0de
0
86
Member Avatar for !CE-9

Hello, I'm trying to implement a system of resource managers. There's a ResourceManager template and its templated member function which will attempt to create a resource from whatever _Creator had been passed (if the given resource can use the given creator class). The _Creator is just an aggregation of information …

0
62
Member Avatar for AutoC

I have a code snippet that strangely works one way on a fedora 6 machine and another way on a fedora 8 machine. [code] void Form1::SendToApp() { vector<int> isciistream; vector<int> fontstream; cout<<"Entering Form1::SendToApp()"<<endl; isciistream=wwnd->OnOK(); isciistream.push_back(32); char str[255]=""; cout<<"Size of IsciiStream:"<<isciistream.size()<<endl; for (int i=0;i<(int)isciistream.size();i++) { sprintf(str,"%s%c",str,isciistream[i]); cout << "isciistream[i] :" << …

Member Avatar for AutoC
0
155
Member Avatar for Abuzer755

Hi Everybody, I am new to C++,but strongly it is recommended to learn C++ for its speed. That is why I'm here.Could you help me about it. Where do I should start from,read which book and etc. Thanks in advance.

Member Avatar for William Hemsworth
0
136
Member Avatar for axelgeorge

Hello everyone, I'm a moderately experienced C++ programmer who has decided its finally time to learn socket programming. I want to learn by writing a simple client/server pair of apps. The client will send a simple text string across the network to the server. So far, I've only worked on …

Member Avatar for Salem
0
76
Member Avatar for abhi.nalluri

I have implemented ReadFile function for reading data through SerialPort.When the other end is responding correctely my program is working fine. Sometimes when I dont get data from the other end my program hangs.For this I have implemented timeouts for Readfile function. But It doesnt seem to be working. My …

Member Avatar for abhi.nalluri
0
429

The End.