51,593 Topics

Member Avatar for
Member Avatar for Chuckleluck

Hi, I'm learning to use the Simple, Fast, Multimedia Library (or SFML), and I was going through the tutorials on their website. The first one (found [URL="http://www.sfml-dev.org/tutorials/1.6/window-window.php"]here[/URL]) said the following: [QUOTE]Under Windows operating systems, you may have created a "Windows Application" project, especially if don't want the console to show …

Member Avatar for thines01
0
2K
Member Avatar for fishsticks1907

Hello, i need help adding to a class member. I want to make a deposit and add $20 to the class member, however, it doesn't change the value of the class member when i do so. example: $200 + $20 = $200 And, i assume the other methods won't work …

Member Avatar for thines01
0
193
Member Avatar for incredi_badd

Hello, This assignment is demanding for me. The user is prompted to enter 4 names, and by way of one cout line, call the function 3 times to determine which name comes first lexicographically. Not sorting all 4 names, just displaying which one comes first. Cannot use a loop, or …

0
45
Member Avatar for gwjunkie

I'm writing a program in C++ to convert a user-submitted string into a postfix expression and then evaluate it. The function where the string is tokenized into operands, operators and such looks like this: [CODE] void Calc::tokenize(char * s){ cout << s << endl; int i = 0; char * …

Member Avatar for gwjunkie
0
103
Member Avatar for jdscams

Im trying to grab a value from my query. Im gettign a sintax error. It contains a picture name mypic.jpg. Then i want to display that on my page. This is what im doing how do i do this correctly. display.aspx [CODE] <asp:Image ID="Img1" ImageUrl="pathToPicture" runat="server" /> [/CODE] display.aspx.cs [CODE] …

0
48
Member Avatar for PapaGeek

I’m writing my first form application in Visual Studio 2008 C++. The first thing that has to happen is to select the project you are working on. I used a combo box that will eventually be initialized from the contents of an INI file. The first time through it will …

0
77
Member Avatar for karmstrong

So I am getting the below error messages with seem to do with vtable. I would assume this is in relation to Virtual functions. I'm not sure what i'm doing wrong here or even the correct corse of action. HELP :-) ? Ld /Users/krisarmstrong/Library/Developer/Xcode/DerivedData/CS215Lab4-cyvyxpagepfuqhdusjdgbpjctcis/Build/Products/Debug/CS215Lab4 normal x86_64 cd /Users/krisarmstrong/Documents/XCodeProjects/CS215Lab4 setenv MACOSX_DEPLOYMENT_TARGET …

Member Avatar for vijayan121
0
709
Member Avatar for boyz
Member Avatar for stereomatching

Sometimes, when I want to move the project from path A:/B/C to path A:B/C/D/E, the relative path of the project have to be changed. I think I could write a small program to deduce the relative path after changed, it would be better if I could change the "Additional manipulate …

Member Avatar for stereomatching
0
195
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
656
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
97
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
512
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
168
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
108
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
202
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
139
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
383
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
581
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
80
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
150
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
102
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
117
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
212
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
71
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
357
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
268
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
49
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
217
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
85
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
244
Member Avatar for something78

Hi, I am a student doing my Final Term Project. I am suppose to create a GUI using C# that can control and interact with a Robot call Robonova-1. The robot will be connected to the PC via Bluetooth. I was thinking to have a connection button in my GUI …

Member Avatar for Seten
0
10K
Member Avatar for toki93

Ummm hi, Ive been having some problems with a program ive been working on. I want to insert a new value in a column in a table from a calculation i get and replace the original value. Heres the part of the code: private void button11_Click(object sender, EventArgs e) { …

Member Avatar for hericles
0
232
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
126
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
244
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
310
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
54
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
103
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
109
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
107
Member Avatar for danbyo1990

Hey Guys, I found an interesting website that has a tutorial for Genetic Algorithm. Here is the article: [url]http://www.realintelligence.net/tut_genetic[/url] This is the code of its author. I can combine, but there are an errors that I can't fix it. Anyone could help me to fix this. Here is the code …

0
64
Member Avatar for PapaGeek

I need to be able to call some very old C functions from a form application. What I found on line was to use 'extern "C"' to let Visual Studio know how to handle the calling parameters. But I'm getting a compiler error and not sure where it is coming …

Member Avatar for PapaGeek
0
1K
Member Avatar for wmurrow

Hey all. I'm trying to get the FindDaysOver function to grab the avg result from the CalcAvg function result in main. What am I doing wrong? Any help would be appreciated! [CODE] #include<iostream> #include <iomanip> using namespace std; double FindMax(double [], int); double FindMin(double [], int); double CalcAvg(double [], int); …

Member Avatar for WaltP
0
148
Member Avatar for MrEARTHSHAcKER

Hi, I wondered if it was possible to declare the friends of class but out of it? Like this: You have created class: [CODE]class myclass{ int x; public: bla bla bla };[/CODE] And instead of this: [CODE]class myclass{ int x; public: bla bla bla friend class someclass; };[/CODE] If it …

Member Avatar for MrEARTHSHAcKER
0
3K
Member Avatar for MaSSaSLaYeR

Hallo! I got the following Decimal IP: "3232235876" it represents "192.168.1.100" I got it in the following way: Code: [CODE] //GET IP if (gethostname(hostname, sizeof(hostname)) == SOCKET_ERROR) { printf("%s","host not found"); } struct hostent *phe = gethostbyname(hostname); memcpy(&addr, phe->h_addr_list[0], sizeof(struct in_addr)); //Convert IP to Decimal notation sprintf(decResult,"%u", addr); sprintf(decResult,"%u", htonl(atoi(decResult)));[/CODE] …

Member Avatar for gusano79
0
863
Member Avatar for kcp

I just recently started learning C++, in the book i am learning from there is a problem that asks you to write a simple pasword program. It just asks the user the password and then displays a message wether its right or wrong after they enter it. I am having …

Member Avatar for WaltP
0
348
Member Avatar for xsharpx

I've been playing around with this for a while and just can't seem to get it right. Any help is appreciated! [CODE]string catalog[][] = { {"item1 - 0 dollar(s) each","description1"}, {"item2 - 3 dollar(s) each","description2"}, {"item3 - 5 dollar(s) each","description3"}, {"item4 - 7 dollar(s) each","description4"}, {"item5 - 9 dollar(s) each","description5"} …

Member Avatar for amt007kmr
0
111
Member Avatar for existence19

Hi I have to create a hash map with key as string and data as string. i have to create a custom hash function for the hash map, but i don't know how to do that.. can somebody explain and give an example from which i could understand?

Member Avatar for vijayan121
0
823
Member Avatar for BoBok2002

Hi, This is my first project involving processes I am completely lost. I need to create 10 processes that run at the same time. I know that a process is a program in execution so I must write a program that executes 10 times. I used Win32 API to create …

Member Avatar for vijayan121
0
3K

The End.