49,757 Topics

Member Avatar for
Member Avatar for anthony5557

I've been trying for hours to find out how to display an inputed word backwards but I just can't figure it out. Could someone help me please!! Thank you guys for your time.

Member Avatar for hag++
0
2K
Member Avatar for johnson9000

Why does my file operation code write random data over the first two numbers I store in the file. The code compiles and runs without error messages, but I try to store the vector [0 0 0 0 0] and instead I get [20520 2414 0 0 0]. I am …

Member Avatar for Dave Sinkula
0
157
Member Avatar for supriya14

how to i check whether the map1 exist or not for some string in map <string, map1<string, int> > map2

Member Avatar for Protuberance
0
74
Member Avatar for fadia

Hello guys.. I'm working on a project. There are 3 classes. Two are inherited from one. This is the implementation of the main class. There's an error. I have no idea how to debug it. Would you please check it?! [CODE]# include <iostream> # include <string> # include "MainMenu.h" using …

Member Avatar for CJesusSaves
-1
114
Member Avatar for Nikhar

I have been studying graphs currently and came across a way to implement it. [code] #include<iostream> #include<vector> #include<string> #include<map> #include<functional> #include<cstdlib> using namespace std; struct vertex; struct edge { vertex *dest; double cost; edge(vertex *a=NULL, double b=0) { dest=a; cost=b; } }; struct vertex { string name; vector<edge> adj; vertex(string …

Member Avatar for Nikhar
-1
107
Member Avatar for iou

Hi, I've been working alot on a program lately, and I'm actually veeery close to done. Atleast until I come up with something more to add. The most useful function of this program, is the ability to create Shortcuts, which at the same time creates a command to start it. …

Member Avatar for mitrmkar
0
279
Member Avatar for pradeey

chk this piece of code [CODE]#include<iostream.h> using namespace std; class hi { public: void print() { cout<<"hi"; } }obj; int main() { hi *h; h->print(); } [/CODE] output---> hi -------------------------------------------------------- [CODE]#include<iostream.h> using namespace std; class hi { public: void print() { cout<<"hi"; } }obj; int main() { obj.print(); } [/CODE] …

Member Avatar for Rajesh R Subram
0
128
Member Avatar for nichya88

Today I've learned some concepts about Pointer in C++ and I have a confusion in this code snippet and its result. Source Code: [code] // Pointer array #include <iostream> using namespace std; void main () { char * say = "Hello"; // cout << "say = " << say << …

Member Avatar for nichya88
0
137
Member Avatar for atticusr5

Hey everyone I'm a college student taking semester two of C++ and we have a project using classes. This semester we are strictly using Vi to edit and compile my code. WARNING THIS CODE IS NOT THE WAY I WOULD PERSONALY WRITE IT, BUT MY INSTRUCTOR INSISTS ON THIS FORMAT. …

Member Avatar for Anarionist
0
129
Member Avatar for epicnote

Hello guys, by the way I am a newbie here. This is my first post in this forum. I am now doing a window application(MFC.exe-dialog based) using the Microsoft Visual C++ 6 Enterprise Edition. Actually I am doing the simple application that read a string from text file. I only …

Member Avatar for epicnote
0
149
Member Avatar for dnyal-1

i wrote this module code but not sure if this is how you write a module. Is there anything i have missed?? [CODE]int FirstModule(int section) { cout<< "Pick a number " <<endl; cout<<endl; cin>>number; if (number == 1) value = 1.00; else if (number == 2) value = 1.10; else …

Member Avatar for jonsca
0
66
Member Avatar for clutchkiller

Hi, so ive been teaching my self pointers, and I just wanted to clarify what I assume so far. You cant declare: int var1 = &var2; You MUST use a pointer to store an address: int *var1 = &var2; When assigning a pointer variable, it must always point to an …

Member Avatar for clutchkiller
0
75
Member Avatar for jigglywiggly

So I am new to C++, but I have read on dynamic memory and pointers. I know java well, but java gives you a lot of helpers, C++ not so much D: Ok so I am using VS 2008, and I am just rather baffled on how to get started. …

Member Avatar for mrnutty
0
274
Member Avatar for Violet_82

Hi there, I am new to C++ and trying to get my head around it. I am writing really simple and small programs and I have Visual C++. Now, can anybody summarize how I can run a program I wrote with C++ on Visual? The guide that comes with the …

Member Avatar for Violet_82
0
183
Member Avatar for tizzo233

Hi. I have a working program that lets you put info about a coupon. and then later on you can search for coupons, display them or remove them from the linked list. My problem is that, we are not supposed to perform input operations from our classes. But the way …

Member Avatar for Agni
0
107
Member Avatar for fadia

Hello.. I'm working on my project.. It's not done yet.. But i wanna debug these errors now first.. Please would someone check them for me. Thanks.. Here is the interface: [CODE]# ifndef MAINMENU_H # define MAINMENU_H # include <iostream> using namespace std; class MainMenu { public: MainMenu(); MainMenu(string the_name); MainMenu(string …

Member Avatar for WaltP
0
123
Member Avatar for xxmp

i cave this code [CODE] #include <iostream> #include <cstdlib> #include <cassert> using namespace std; typedef int typos_akmis; template <class typos_stoixeiou> struct korifi { typos_stoixeiou dedomena; /* i would like to do korifi<typos_stoixeiou> * ->kdktis */ korifi<typos_stoixeiou> * epomenos; akmi<typos_stoixeiou>* kefali; /* here is the problem */ int episkeftike; } ; …

Member Avatar for tkud
0
99
Member Avatar for ferlyn

hello everyone, im just confused on how to create GUI using the visual c++, could you help me.. coz i tried one but it doesnt work at all, do i haVE to setup anything on its properties

Member Avatar for donaldw
0
119
Member Avatar for flyingguitar

ok, so I have the following code. [CODE]#include <iostream> using namespace std; int main() { char name[80]; cout << "\n\nEnter your name: "; cin >> name; cout << name; return 0; }[/CODE] but here's the problem. whenever I enter a space in the name, everything after the space doesn't appear …

Member Avatar for flyingguitar
1
94
Member Avatar for robinotje

Hello everyone, I'm new to C / C++, and just wanted to make a file which can delete an item. The code worked, but when I want to give a path, it doesn't work anymore. Any help? [CODE] #include <iostream> #include <stdio.h> using namespace std; int main() { remove ("c:\users\asus\new.docx"); …

Member Avatar for robinotje
0
190
Member Avatar for cwarn23

I know how to make 64 bit integers but how do I make 64 megabit integers? That is a bit rate of (1024^3)*64 bits. Is this a simple job as I don't know where to begin. I thought somebody might know of a library/script that will allow custom bit rates …

Member Avatar for cwarn23
0
140
Member Avatar for Hawkpath

Hi, I'm just learning win32 and i wanna know: is it really necessary that i memorize all of the syntax. Is that what professionals do? Or can I just copy and paste it every time and just know what it does. Thanks, Hawkpath

Member Avatar for Rajesh R Subram
0
157
Member Avatar for aszopinski

I am relatively new to C++ and am currently taking a course for it. One of my assignments is to make a calculator for hourly wages and figure gross and net pay based on a fixed percentage for taxes. I am able to compile the code if I change the …

Member Avatar for Rajesh R Subram
0
178
Member Avatar for V0ldemort

If I have a void pointer that needs to point to a struct. I'm not sure how to access the struct through the pointer. Can I even do that? If so, how? [CODE] #include <iostream> struct test { int var1; int var2; }; int main() { void *pPointer; pPointer = …

Member Avatar for Rajesh R Subram
0
94
Member Avatar for atticusr5

Hello all I am a second year C++ student in college and I am running into some issues with a code assignment I am writing. *Note: I realize that there may be better ways of doing the code but I am following my instructors guidelines so please no posts about …

Member Avatar for SasseMan
0
139
Member Avatar for brigadoon

How to capture the WM_RBUTTONDOWN event from the Listbox part of a Combobox control? I have a MFC dialog based application. A CComboBoxEx control is defined as m_comboBox1, it has a dropdown list of a few items. When the drop down list is shown, I want to cancel the list …

0
45
Member Avatar for chukka32

Hi all, I am a beginner to C++ and am having problems with data validation in a project. The program is a oylmpic diving score program and is working ok only for when I input an invalid character the for loop seems to continusal run. Is there an easy for …

Member Avatar for chukka32
0
218
Member Avatar for Phil++

Ok, I'm doing my course work and I've managed to get it so that the menu will only show values if they've been entered, for example: [code] if number_of_employees is 0 then display add employee otherwise display add employee display view employee endif [/code] The problem that I'm having is …

Member Avatar for mrnutty
0
72
Member Avatar for DavidDD

Hey! Alright, I am working a program in C++ (obviously ;P). I have been working on this game a very long time and took a break from it. I actually forgot how this line works: [CODE] vector<string> sWords(1); int a = 0; ifstream myfile("words.txt"); if(!myfile) { cout << "Error opening …

Member Avatar for DavidDD
0
294
Member Avatar for C++ Beginner

Problem: Write a program that has an array of at least 20 integers. It should call a function that uses the linear search algoritm to locate one of the values. The function should keep a count of the number of comparisons it makes until it finds the value. The program …

Member Avatar for hag++
0
2K

The End.