49,761 Topics

Member Avatar for
Member Avatar for r3s3v0ir

Good evening guys.... i'm newbie in here and in c++... while i in the middle of pratice in making program... i try to make a stack that can check whether the string that user input is palindrome or not. i'm using visual studio 2010 and get autos error this is …

Member Avatar for Taywin
0
232
Member Avatar for Jake1905

I am completly lost on this could someone point me in the right direction into where I am going wrong with this code. [CODE]#include <iostream> using namespace std ; int main() { int x ; int y ; int temp ; int remainder ; // read in the two integers …

Member Avatar for ixmike88
0
98
Member Avatar for burcin erek

i made a test program, this line " *ps.Working_Hours=10;" generates mistake. why ? [CODE]#include <cstdlib> #include <iostream> using namespace std; class Salary { public: int Working_Hours; float hour_rate; float x; }; int main(int argc, char *argv[]) { Salary s; float yy; s.Working_Hours=7; s.hour_rate=30.5; Salary* ps; ps=&s; *ps.Working_Hours=10; cout << "s.hour_rate=" …

Member Avatar for burcin erek
0
175
Member Avatar for jvibez

write a pseudocode algorithm tp prompt the user to enter a number and it should tell if the number is odd or even.........i need help

Member Avatar for daviddoria
0
47
Member Avatar for mogaka

am new to c++. i want to create a desktop application but i don't know how to create a user interface-forms like vb.ne forms using dev c++ IDE. how do i go about it.

Member Avatar for daviddoria
0
217
Member Avatar for tKc

I need help in using 2d arrays in c++. I want to output a table that looks like this 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 …

Member Avatar for daviddoria
0
166
Member Avatar for iarkey

Ok i've got this simple code to encrypt a msg with a private key. When i run the app it crashes. Any help? [CODE]#include <stdio.h> #include <string.h> #include <openssl/rsa.h> #include <openssl/pem.h> int main() { char keyy[] = "Private key here"; unsigned char *key = (unsigned char* )keyy; printf("%d\n",sizeof(keyy)); RSA *public_key …

Member Avatar for daviddoria
0
91
Member Avatar for beatenbob

I'm trying to write a program which uses 4 class files. However, I've got some issue regarding the error I got from cygwin using g++ command, it says Calling fdopen: bad file descriptor when I try to include the files I need on top of my header files. I'll show …

Member Avatar for beatenbob
0
455
Member Avatar for Nathaniel10

Is it possible to have an array as a class member? It is part of my Wumpus Hunt exercise. I want to do the following: [code] class Room { blah blah; }; int main() { for (i = 0; i < 3; i++) { Room adjacent[i]; blah blah; } [/code] …

Member Avatar for Nathaniel10
0
108
Member Avatar for vbx_wx

[code] int main() { const char* p = "Hello"; cout << sizeof(p) << endl; } [/code] Why this is 4 ?

Member Avatar for nbaztec
0
96
Member Avatar for gmfreak1991

Hey, I'm writing a wheel of fortune game and trying to figure out how to make the game update what players turn it is. It is assumed that there is only three players, and the variable "int players = 1" is defined globally, so if I change it in the …

Member Avatar for Fbody
0
171
Member Avatar for philipB

My teacher has given me an assignment to parse a text file that contains no more than 25 "Students" the Student object has a Name, and five grades contained within an array. Now, I've set up the Student file, the Array template file per his instructions and i'm reading in …

Member Avatar for Taywin
0
106
Member Avatar for tmantix

Hey, This is probably a newb question, but what all can a string type variable hold? Is it restricted to just letters or can it hold things like "/\|;:'><!@#$%^"...?

Member Avatar for tmantix
0
234
Member Avatar for chibon

Hello all i need help with my school project which is to create c/c++ program to demonstrate the AI problem of coloring the Australian map With Forward Checking, i Kind off dumb when it comes to c/c++ anyone can help me with the source code? Thank You

Member Avatar for Fbody
-3
132
Member Avatar for centerline00

O.K., I have a project I'm working on. It uses 8 classes (I'm only showing 2 and main). It gives me a "bad_alloc" error when the obj is instantiated. When obj is removed it works fine (or call the personType class that "should" be inherited from extPersonType.) Any thoughts of …

Member Avatar for Fbody
0
234
Member Avatar for enkidu75

I am making a program for my class where I handle equation problems such as: 2a-3b+5c=10 3a-2b-3c=-5 where the answer would be: 5a-5b+2c=5 This is what I have so far. It still isn't perfect cause I still haven't figured out the "=" part. I do have it performing the math …

Member Avatar for StuXYZ
0
167
Member Avatar for georgy9002

Hi could someone help me with my existing code !? I need Write an OO program using two Classes to create a guessing game in which the user must guess a number between 1 and 100 . The user is given a maximum try of 10 tries to guess each …

Member Avatar for StuXYZ
0
95
Member Avatar for fakiha erum

sir i am being given a task to make a program which evaluate the fictorial of a given number, using loops. please guide me who i could do this

Member Avatar for Nick Evan
0
156
Member Avatar for atoivan

i need help with a program i am writing a in c++ and Java .a program that when i input a figure like 2345 it will sum the figure up by adding 2+3+4+5 can any one help some one give me some code int a = 0 int i = …

Member Avatar for atoivan
0
87
Member Avatar for jeffpro

I have a program that works on Windows XP but when I try to run it on Windows 7 I get this error. Debug Assertion Failed! File: c:\program files\microsoft visual studio .net 2003\vc7\atlmfc\include\atlcomcli.h Line: 148 Expression: p!=0 I've googled for hours.

Member Avatar for arkoenig
0
106
Member Avatar for networkZombie

I have to write a program for computer science that takes in the total amount of goods your buying and what amount your paying with and then outputs how much change you will receive. So for example your buying something for $3.99 and you have a $5 bill then it …

Member Avatar for jonsca
0
160
Member Avatar for ShontiD

Using Visual Studio 2008...My assignment is to use the file SalesData.txt to load an array of structs, and use the array of structs to show to the screen a control-break report which breaks with each change in salesperson and shows each salesperson's total sales. I have not finished but I …

Member Avatar for Ancient Dragon
0
143
Member Avatar for PinkyMV

Hi all, I'm new to programming and I am currently taking an intro class that is requiring me to create Wheel of Fortune in c ++. I've made some decent head-way (I think), but I'm still far from getting this right. Here's what I have so far: *NOTE* The function …

Member Avatar for dexter321
0
3K
Member Avatar for gmfreak1991

Hey i'm doing a project, and i'm at the part where the user must enter a phrase or sentence and it must be compared to the phrase or sentence already imput to the computer via file. I'm asking a user to enter the sentence / phrase using cin.getline, but when …

Member Avatar for gmfreak1991
0
2K
Member Avatar for baconswife

Hello, for some reason I am having trouble remembering how to make it exit when they push the number 9. Can anyone help me? Also, I need it to repeat rather than at the end saying "press any key to continue" I know I will do this using while (choice …

Member Avatar for baconswife
0
249
Member Avatar for nickx522

I cannot quit after the program went to loop and if user choose not to continue game 'n' the program keeps asking for new guess. heres the code [CODE]#include <iostream> #include <iomanip> //#include <stdlib> #include <ctime> //or <ctime> using namespace std; int main() { //local constants const int MAX_NUM = …

Member Avatar for Nandomo
0
96
Member Avatar for MasterGberry

Hello. I am trying to store information in a structure using this pointer loop method. If i try using the getline() method it seems to crash the program, and without it crashes if i enter more then 1 word. Also when the last loop deleting the pointers goes off it …

Member Avatar for Duoas
0
978
Member Avatar for Rickay

[CODE]int main2() { cin.get(); cin.ignore(); cin.clear(); while(true) { long double x, y; char ch_op; Sleep(200); cout << "Enter an expression below: \nExamples:\n"; cout << "x + y for Addition.\nx * y for Multiplication.\n" << "x / y for Division\nx - y for Subtraction.\nx & x for Square Roots.\n" << "x …

Member Avatar for Rickay
0
204
Member Avatar for Nathaniel10

Stroustrup has an exercise in which the reader writes a program for the wumpus hunt game. A first draft of my code is below. It compiles and runs partly correctly. If you choose to move to a different room the program runs as expected. If you choose to shoot at …

Member Avatar for SgtMe
0
176
Member Avatar for keeda

Hi, What could be the most efficient algorithm(time/memory wise) for the below problem? Q: create an array of unique elements from a given array? Thanks in advance.

Member Avatar for myk45
0
84

The End.