51,593 Topics

Member Avatar for
Member Avatar for rkulp

Ok its been awhile since I've taken a CS class and I am still a bit rusty. It seems like a simple problem but I just cant get my brain around it. The program needs to shake a boggle board. For those of you who have never played this game, …

Member Avatar for rkulp
0
108
Member Avatar for nainish

Hi! i m doing a project for my MSc academic year i need an implementation code for single perceptron network, which will have six inputs and a single output which will give me acurate result.

Member Avatar for hag++
-2
142
Member Avatar for jeffjnsb

a C++ newbie here.. I am doing the question at the end of Ch3 which is about classes, objects, and constructors. I'm stuck on a few that asks you to write a C++ statement for each: (On 5, I wasn't sure how to give a value in the same statement.. …

Member Avatar for mrnutty
0
180
Member Avatar for anthony5557
Member Avatar for mrnutty
0
192
Member Avatar for Reborn121

Hi everyone...I am building a program to input students names(first and last) and also GPA. I have everything working but the sort by last name. Everything works fine, even the GPA sort but the last name sort will not. Please help. Below is the function in my program i am …

Member Avatar for hag++
0
151
Member Avatar for Nikhar

Hi guys, can you please describe the knapsack algorithm in English. I googled this, the first page was wikipedia. The algorithm there is too mathematical which doesn't help me to understand the solution. Can you please describe its algorithm?

Member Avatar for hag++
-2
63
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
160
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
78
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
115
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
110
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
336
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
140
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
139
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
132
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
151
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
68
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
77
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
323
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
187
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
111
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
124
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
103
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
122
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
96
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
194
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
143
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
159
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
184
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
95
Member Avatar for SteveyD

Greetings again. I'm encountering an error with the following section of my script. If I include the commented section my program returns the following error; "(Router -Startup) the URL cannot be empty. Parameter name : url" With it commented out like below, the .dll functions correctly. [code] public List<Form> Startup() …

Member Avatar for SteveyD
0
818
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
142
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
271
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
74
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
353
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
Member Avatar for techniskull

hi guys i have been given an assignment to write a program which inputs date month and year and than outputs Full calender of that month .. Help Is really Appreciated Thanks

Member Avatar for Ancient Dragon
-1
79
Member Avatar for shethia.tejas

hie, i want to operate a usb webcam using c or c++ language that is i want it to take pictures using c/c++ commands can any1 suggest me how can this be done. Also i want to find out two laser spots from an image using processing and track them …

Member Avatar for daviddoria
0
160
Member Avatar for merse

It is possible to write, but the compiler dont find the function when I want to use func(x): [CODE]template <class T> double func(const double& x, const double& error = 0) {...}[/CODE] I have to write separately, like this why? [CODE]template <class T> double func(const double& x, const double& error) {...} …

Member Avatar for Dave Sinkula
0
100
Member Avatar for Gibson_Junk

I am trying to make a program to login to a website for me and retrieve off a certain page. Website i am trying is beta.rapidpremium.net i do have a working login for this site but need to know what to do to get required information for using the same …

Member Avatar for kvprajapati
0
70
Member Avatar for tizzo233

Hi. I am kind of having trouble with some functions. Basically, I know how to write out functions using void and no return, but for this problem I am working on, I have to use int myfunction(something&) instead of void myfunction(). Can anyone please lead me in the right direction …

Member Avatar for tizzo233
0
204
Member Avatar for Instinctlol

I was just wondering how I would compare 2 different object member of the same class. I want to compare the int speed between the 2 objects. Lets say I have a [CODE] class Car { private: int speed; public: int compare(Car car) } main() { Car Honda, Toyota; //Lets …

Member Avatar for Instinctlol
0
137
Member Avatar for tizzo233

Hi. I am trying to input values from a user and put them in a linked list. Some how when I display the values that the user inputs, they are both show up under one variable. ie. user inputs $3 and then inputs $5 for next variable. however, when i …

Member Avatar for thomas_naveen
0
109
Member Avatar for stardustmeri

Greetings! My Instructor is asking me to do something that I am totally confused about. I need some assistance. Thanks! Here's the information: For the lab this week, create an original single-file command line program that does the following: 1. Prints your name (First and last) 2. Recursively computes the …

Member Avatar for Seten
-2
147
Member Avatar for dron

Hello, Is there a way to get the time of a remote computer (for synchronization purposes) using Win32 API? I need to do programmatically what the NET TIME MS-DOS command does. Thanks.

0
61
Member Avatar for glitteringsound

Hello, Can any body give me the idea how to extract information from win 32 dll's. e.g class name all methods which dll exports. name of methods, parameter types(in,out) & return type of that method. all variables (private,public,protected). all data structures listed we can do the same job from tlb …

0
39
Member Avatar for nichya88

Hi everyone, I'm an absolute newbie in C++, please help me to solve this problem. This problem is something related to the [I][B]getline[/B][/I] method. I write a program to ask for user's age and name. Just for demonstrating some IO operations. [CODE] /*IO Example*/ #include <iostream> #include <string> using namespace …

Member Avatar for nichya88
0
145
Member Avatar for Nautise

working on the backwards String and i can't get it to print correctly plz help [CODE] #include <iostream> using namespace std; void backward(char *); // Function prototype int main() { const int SIZE = 11; // Array size char string[SIZE]; // To hold a string // Ask the user to …

Member Avatar for Nautise
0
128
Member Avatar for atjfriday2

Having the user “insert” their money. The money insertion will be handled in a Loop. For example, before they start, their total inserted is $0. let’s say that a drink costs $1.00. If they say that they are inserting “$0.25” then we will add $0.25 to $0 and tell them …

Member Avatar for hag++
0
173

The End.