49,761 Topics

Member Avatar for
Member Avatar for JayBaron

Making a chutes and ladder game for my CS2010 class and go it knocked out pretty quick. So I thought everything was running smoothly until I tried to run the program. The problem has to do something about my "winner" function, but I've gone over my teachers notes and cannot …

Member Avatar for WaltP
0
648
Member Avatar for amgad habeeb

hello guys grade book *write a program that will calculate the average of an unknown number of students. *your program should validate the grades to be between 0 and 100. *there are 5 grades to be entered and averaged . *the program should enter the grades using a for loop …

Member Avatar for amgad habeeb
0
94
Member Avatar for efigen

I have been working on this assignment, and it says i have to sort a 2d record array based on the type of record so if its an id its an int and if a name its a string, my problem is when i begin using my bubble sort, it …

Member Avatar for efigen
0
509
Member Avatar for skylinedrifter

Was doing this project for school, but i cant get it to run, it's a telephone directory project here's the code [CODE]#include<iostream> #include<fstream> #include<string> #include<iomanip> using namespace std; char getChoice() { char choice; cout<<endl<<"Do you want to look for another? "; cin>>choice; return choice; } void getNames(string &strFName, string &strLName) …

Member Avatar for skylinedrifter
0
165
Member Avatar for GhostMonkey

Hey, I've got a list that takes in the current co-ordinates from a board. I'm trying to sort that list using the Manhattan distance heuristic but I'm not sure how to go about it. My list is simply [CODE] list<int> list1;[/CODE] With the formula by which it should be sorted …

Member Avatar for raptr_dflo
0
103
Member Avatar for pnoylover

[CODE]#include<iostream> #include<string> #include<conio.h> using namespace std; struct node{ int num,ages; string name,skills; struct node *link; }; typedef struct node *nodepointer; nodepointer add(nodepointer &head, int nu, int age); void str(nodepointer &head, string na, string ski); void DeleteFront(nodepointer &head); void display(nodepointer head); int main(){ nodepointer head = NULL; int c,nu,age; string na,ski; …

Member Avatar for raptr_dflo
0
200
Member Avatar for phorce

Hello wonder if you could help me please.. Basically I'm trying to implement a script where it searches through a file and sees the most popular word.. I've got it doing it like this: [CODE] Squence: 0 0 Squence: 1 0 Squence: 2 0 Squence: 3 0 Squence: 4 0 …

Member Avatar for raptr_dflo
0
136
Member Avatar for Rokie

Hi everyone, Im using VS2008 and getting the following error message when I try to build the program which I have so far, I've looked around on the internet to try to understand this error but I'm still very confused any help you can offer me will be greatly appreshiated, …

Member Avatar for raptr_dflo
0
377
Member Avatar for Xcelled194

Hi guys, I'm fairly new to C++, though I have several years of experience with C#. I've made program with XAML and C++. Part of the program's job is to download several hundred 10mb files from an FTP patch server. I've been using the .NET FtpWebRequest for this task, and …

Member Avatar for L7Sqr
0
570
Member Avatar for phorce

Hello, I need to search a char array, for a particular word... E.g. [code] char * search; char arr[10] = {'b', 'c', 'a', 't', 'h', 'e', 'p', 'h'}; string words[1] = {"the"}; search = strstr (alphabet, words); [/code] But it doesn't work... Any ideas what the problem could be? Thanks …

Member Avatar for thines01
0
78
Member Avatar for icebirdy

For example, I have 2 classes A[x,y,z] and B[a,b] and one vector for each class. I want to read a text file containing data with my two classes For example the text file may contain: A [1,2,3] B [1,2] A [4,5,6] How do i read in this file such that …

Member Avatar for mrnutty
0
147
Member Avatar for taloosheh

a program that inputs a set of letter codes f for female m for male and gpa then computes and outputs the gpa for both female and male

Member Avatar for Pseudo Coder
-3
100
Member Avatar for sita12345

I am trying to write a simple code with if condition. If(x==1||x==2||x==3) { found true; } else { cout<<"Please provide the correct input"; cin<<input; } Based on this i need to have another condition: if(found) { cout<<"Enter number"; cin>>no; } The problem with the code is when i am entering …

Member Avatar for sita12345
0
116
Member Avatar for jackly94

Ok i have a problem which i cant seem to figure out why it is not woriking, First off When i do Enter in some Details and want to enter Records to the end of File it give me the choice of enter in the Details. When display the Array …

Member Avatar for jackly94
0
210
Member Avatar for siskaj

I want to work with pdf files (open, search some string of chars, close). I found just [URL="http://wxcode.sourceforge.net/docs/wxpdfdoc/index.html"]this[/URL] and I want to ask you who "know how" to implement it to wxDev cpp (something as a downloand is not available, just pieces of source code). Thanks for answers!

Member Avatar for siskaj
0
68
Member Avatar for PrimePackster

Hi guys, here i have a problem, that i have been trying to rectify for past 1 and half hour. Here in the code, as you can see, When the user Press Y, He get the chance to input the exponent value. There i have added another nested if, so …

Member Avatar for Fbody
0
346
Member Avatar for A&M_guy

I am new to structs and I am trying to sort an array of structs but I can't seem to get it to work, I can't figure out what I am doing wrong and any assistance would be very much appreciated! [CODE]#include <iostream> #include <fstream> #include <iomanip> using namespace std; …

Member Avatar for A&M_guy
0
265
Member Avatar for sianpunky

C++ Syntax (Toggle Plain Text) Hi, from the previous link : [url]http://www.daniweb.com/software-development/cpp/threads/365264[/url] How to do i sort by using X or Y for the coordinates of Line2D and Line3D since Line2D, Line3D contains 2 pairs of coordinates. example. Line3D, [7, 12, 3], [-9, 13, 68] Line2D, [5, 7], [3, 8] …

0
48
Member Avatar for minghags

Hello! I wanna ask you guys for help with this program. Here is my problem explanation: I want that user gives an input in the beginning of the program how big should tictactoe board would be. For example: input: 4 so board would be 4x4. Code of the current problem …

Member Avatar for WaltP
0
1K
Member Avatar for maynardjk13

Okay, So I have this program that spits out the sum and average of a list of numbers that the user inputs. When ever I run it, though, it gives me crazy numbers. For example, when I put the values 1, 2 and 3, it gives me 3.957e+10 as the …

Member Avatar for PrimePackster
0
212
Member Avatar for fatzky_04

Searching a circular linked list: Give a procedure in C, say ‘searchcircular (list,x) where the search stops when every element in the list has already been visited and the next node pointer points again to the first node that was earlier visited.

Member Avatar for Ancient Dragon
-2
84
Member Avatar for alishanvr

[CODE] // Node .h #ifndef NODE_H_INCLUDED #define NODE_H_INCLUDED # include <iostream> using namespace std ; class Node { private: int object ; Node *nextNode ; public: Node() ; void setObject(int x) ; void setNext(Node *next) ; int getObject() ; Node *getNext() ; } ; #endif // NODE_H_INCLUDED //----------------------------------------------------- // Node.cpp …

Member Avatar for alishanvr
0
2K
Member Avatar for AmerJamil

i am having problem in type casting,the result of the following code is giving -64, however it should be 192, why this is so? [CODE] #include <iostream> using namespace std; int main() { int a; a=char (192); cout<<a; return 0; } [/CODE]

Member Avatar for MandrewP
0
242
Member Avatar for Sluazie

hey! so i have to write a code that generates a number from 25-100 (x) and this will be the index of my array. i then need to x numbers from 1-1000 and store them as the element of my array. that is the first function. in the second function …

Member Avatar for WaltP
0
119
Member Avatar for tvm78

so i have this program written and i am getting a seg fault and the stack said in operator<<. I have no idea how to fix this...It is due in thirty minutes if someone can please help me asap. Here is where i think the problem lies: [CODE]#include <iostream> #include …

Member Avatar for Ancient Dragon
0
225
Member Avatar for armaan ali

hello, i want an algorithm coding the algorithm is [ADD A NODE IN DOUBLE LINK LIST] the algorithm is follow. instwl( info,forw,back,start,avail,locA,locB,item) 1- if avail=NULL then write overflow and exit. 2- [remove node from avail list and copy new data into node] set new=avail avail=forw[avail] info[new]=item 3- [insert node into …

Member Avatar for frogboy77
0
304
Member Avatar for vermaashish_mca

Hi I need to input data into the keyboard buffer; so that the input data will be written to the application which currently has the keyboard focus. I have written the following code to input the unicode characters into the key board buffer but the output is not the desired …

0
53
Member Avatar for PrimePackster

In the User defined function sum(), i am getting the Lvalue required error, can you please tell me why? [CODE]#include<iostream.h> #include<conio.h> #include<math.h> int num,digit,sum1,p; int sqlarge(int &a, int &b, int t=0) { if(a>b) { t=a; a=pow(t,2); return a; } if(a<b) { t=b; b=pow(t,2); return b; } else {cout<<"Both values can …

Member Avatar for PrimePackster
0
100
Member Avatar for maria536

I need help so that this program decrypts. Can someone take a look and run it I have the following errors. 1>------ Build started: Project: Decryption, Configuration: Debug Win32 ------ 1>Compiling... 1>Decryption.cpp 1>e:\prog100\simplycpp\tutorial11\exercises\decryption\decryption\decryption\decryption.cpp(18) : error C2059: syntax error : '}' 1>e:\prog100\simplycpp\tutorial11\exercises\decryption\decryption\decryption\decryption.cpp(31) : error C2679: binary '=' : no operator found …

Member Avatar for Labdabeta
0
105
Member Avatar for nchy13

what's wrong with it compiler shows: [B]cor.cpp:6:10: error: cannot convert ‘int (*)[10]’ to ‘int**’ in initialization[/B] is it like b is a pointer that is an array of 10 1d arrays i.e, rows. but what shall we write at line 6 to get rid of it. [CODE]#include <iostream> using namespace …

Member Avatar for Labdabeta
0
106

The End.