49,766 Topics

Member Avatar for
Member Avatar for lancevo3

Hey guys I am trying to print the contents of a map container I have. I seem to be getting a nasty error from the compiler which seems to come from the pos = wordList.begin() part. any suggestions? [code=cplusplus] map<string, unsigned>::iterator pos; for(pos = wordList.begin(); pos != wordList.end(); ++pos) { …

Member Avatar for twomers
0
508
Member Avatar for joelol

[CODE]#include "stdafx.h" #include <iostream> #include <string> // say what standard-library names we use using std::cin; using std::cout; using std::endl; using std::string; int main() { // ask for the person's name cout << "What's your name? "; // read the name string name; cin >> name; // build the message that …

Member Avatar for wingless
0
87
Member Avatar for Star Frost

I know this might seem like a repeat of an already existent thread, however give me a moment to explain... What I have so far is a function that reads in a script file and stores each word in an array of custom objects. function: [CODE] void fileTester::readFile( string tempName …

Member Avatar for Star Frost
0
186
Member Avatar for snapppy

Hi, was wondering if anyone could put this simple pseudo code into c++, i have not yet learned the code to do it and dont want to wait. If someone could post it i would appreiciate it a lot, thanks! BEGIN Enter # Clear Screen Count = 0; WHILE (Count …

Member Avatar for Grn Xtrm
0
206
Member Avatar for parasm

how to deallocate memory in a c++ program dynamically without using destructor?plz help me.

Member Avatar for sfuo
0
40
Member Avatar for discovery-power

Hi All, I have written a small interactive console application to help me understand variables, when you run the application it will ask you for a length and a width and it is supposed to work out the area. It works up to the part were it is supposed to …

Member Avatar for discovery-power
0
95
Member Avatar for Bips123

Hi, I hav heard that it isn't that simple to write a program in linux using c. Lots of commands n stuff.Please simplify what actually I've got to do to run turbo c++ in my linux laptop as I am a beginner.

Member Avatar for Ancient Dragon
0
139
Member Avatar for karthik.c

hi guys ,im trying to send serialized php object to c++ server. i dont have clear idea if it is possible to deserialize the php object in c++ code.i dont know how to convert it into c++ object and get the value out of it. when im running the server …

Member Avatar for karthik.c
0
1K
Member Avatar for freddyvf
Member Avatar for freddyvf
Member Avatar for NinjaLink

Hi. What I want to do is convert a postfix expression into a infix expression. I am reading the postfix expression from an input file and I want to print the infix expression to an output file. I basically just need help setting up my function, so it will work. …

0
84
Member Avatar for pagis

Hi, Can anyone please tell me how will a C++ function will start in assembly? What will the header look like? is there a conventional first few rows? What about the end of a C++ function? I am very curious about how C++ code really looks like (for example what …

Member Avatar for gerard4143
0
108
Member Avatar for dinamit875

I have written this piece of code which removes spaces in string,its working perfectly, but the other thng that I need is to pass string to left trim function and remove spaces, the new string should returned to the main program, the new string should be passed to the right …

Member Avatar for dinamit875
0
129
Member Avatar for dinamit875

Hi there ppl, im about to create a soccer game for my project in c++, but I dont really know how to get it started,could anyone help me with this,any help will be appreciated.thnx. these are precise step i have to include in the project. (1) set up a league …

0
90
Member Avatar for fadia

Hello.. Can someone help me with this tutorial. only have a background of how to creat a dynamic array in 4 steps but not other than that. And the question seems complicated more than only that. So kindly please someone help me and wxplain it to me. --------------------- write a …

Member Avatar for fadia
0
154
Member Avatar for Eusha

[B]Hi Friends Is There Any Way To Open And ReEdit An .exe File... Suppose I Have a Portable .exe File Which Needs No Installation in My Windows. And I Want To Edit Some Icons or Some Text which is Given in The .exe File So What Should I Need To …

Member Avatar for JasonHippy
0
1K
Member Avatar for aikawa

Cheers guys, my first post here. I've been reading a lot but i can't seem to find any scenario that helps me out with my problem. I'm trying to take input from a file in the form of some shape... rectangle/square, and store it somehow. The shape is composed of …

Member Avatar for ankitnigam
0
505
Member Avatar for racumin

Hi I have a class MapMaker [CODE] class MapMaker { private: Node *grid[MAP_WIDTH][MAP_HEIGHT]; public: MapMaker(); ~MapMaker(); /*this does not work*/ Node*** getMap(int i); }; [/CODE] I need a function that returns the "grid" attribute but I do not know how. Please help me. Below is the code that implements the …

Member Avatar for Sky Diploma
0
154
Member Avatar for thisisanfield.1

I'm having a problem implementing the complexdivbyzero exception handler. It is supposed to be triggered if the user inputs a complex number with both the real and imaginary part being zero. Any help would be appreciated. [CODE]class ComplexDivByZero{};[/CODE] [CODE]complexType complexType::operator/ (const complexType& otherComplex) const throw (ComplexDivByZero) { complexType temp; if …

Member Avatar for ithelp
0
171
Member Avatar for ankit894u

need to decode and encode the following text=== {Newton’s Law of Software Engineering Law 1: Every Software Engineer continues her/his state of chatting or forwarding mails unless s/he is assigned work by external unbalanced manager. Law 2: The rate of change in the software is directly proportional to the payment …

Member Avatar for asb77777777
0
718
Member Avatar for lovely ari

hey every one i'm new here i have visit this forum many times but today i just register i have a big big problem >__< i try to solve it but i can't its about the The Predicate Calculus this is its rule Every atomic sentence is a sentence If …

Member Avatar for lovely ari
0
113
Member Avatar for maverick405

Hello, I am trying to make a GPA calculator, the code below works fine and the output is also fine the only problem is if the GPA is 4.0 or 3.0 or 2.0 or 1.0 it gives me output as 4, 3, 2, 1 i had used variable as float …

Member Avatar for maverick405
0
282
Member Avatar for kingcrim05

I don't get what is happening here. I used this exact code for another algorithm and it works but here i only get large negative numbers for an input, what gives? My output is: floatArray[0] is -107374176.000000 floatArray[1] is -107374176.000000 floatArray[2] is -107374176.000000 floatArray[3] is -107374176.000000 floatArray[4] is -107374176.000000 floatArray[5] …

Member Avatar for twomers
0
98
Member Avatar for Talguy

Last week I was goofing around with multidimensional vectors and removing an element from each row. I got my code to remove and element from each row working inside int main, but when I put all this code inside of a function I started to get errors. The common error …

Member Avatar for Talguy
0
563
Member Avatar for low1988

Firstly ,i'm not asking about the code,i need suggestion and idea how to do it.I don't even know what should be the first thing in the main menu,because i think it is not some sort of input and output program.I thought i might relate to something like queue or stack …

Member Avatar for crazyboy
0
127
Member Avatar for restrictment

Hello all, I was soooo close to nearly being done with my game..however when I added the final 'armory' loop I got an error! I took the loop out of the program, and ran it by itself, and it worked fine...yet when it is in the program it is wrong? …

Member Avatar for restrictment
0
118
Member Avatar for kesh1000

hi every one i am having problem in accessing my 2d linked list..i am able to get a function in a 1d linked list but this is quite confusing.please if some one could give me a basic algorithm which i could work with i would appreciate it...thanks the function i …

Member Avatar for Ancient Dragon
0
98
Member Avatar for bliya123

Hi can someone explain to me why i get the results 1: 4 3 2: 3 4 3: 3 4 4: 3 4 5: 3 3 6: 3 4 for the following code? #include<stdio.h> void switch2(int *a, int *b) { int hold; hold = *a; *a = *b; *b = …

Member Avatar for Ancient Dragon
0
103
Member Avatar for PoRco1x

I looked around and I didn't quite find what I was looking for. I know that to initialize an array of objects, we have to go something like this : Object *array[10]; But my question is : Why exactly can't we just go like this.. Object array[10];

Member Avatar for necrolin
0
143
Member Avatar for dldsob

I declared 4 different arrays. I dont know how to display all the arrays. Can anyone please help me with this? I want to display all 4 arrays like this: Student 1 2 3 4 5 6 7 Time Status Final 1 0 0 0 0 0 0 0 6.50 …

Member Avatar for PoRco1x
0
84

The End.