49,761 Topics

Member Avatar for
Member Avatar for revenge2

hello, I am following a book and im stuck on this one.....(note it's tacky but just bear with me, im a newb)[CODE] #include <iostream.h> int main() { int RedSoxScore, YankeesScore; cout<<"Enter the score for the RedSox:"; cin>> RedSoxScore; cout<<"Enter the score for the yankees:"; cin>> YankeesScore; cout<<"\n"; if (RedSoxScore > …

Member Avatar for Ancient Dragon
0
127
Member Avatar for george22_jk

hello i am george.i have to do 2 exercises in c/c++ and i dont know a lot of programming.the exercises are: 1) code for depth first search with adjacency list for every graph 2)code for Dijkstra algorithm with weight graph if somebody knows something(code,links,etc...) that could help me please contact …

Member Avatar for Salem
0
173
Member Avatar for Butterflieq

Hey guys gotta quick question for ya. I'm trying to figure out the best way to write an array for the following: (1) Hot dog 1.50 (2) Fries 1.00 (3) Lemonade .75 (4) End order You should be allowed to keep ordering from the menu until you press 4 for …

Member Avatar for neosomosis
0
146
Member Avatar for ahmedusa2005

Dear Members I have started the following program, and I do not know how to solve the issue to store names in an array and retrieve them again, and how tos tore the names in a file in the Hard drive. If somebody could help me with my issue. Thanks …

Member Avatar for neosomosis
0
93
Member Avatar for eranga262154

Hi all, I want to find the number of words in a rich edit control. There is no direct class member to do this. So I think if I can count the number of word break and line brake then it is easy. But it is also not easy. On …

Member Avatar for WolfPack
0
888
Member Avatar for Exelio

hi all, I am using ORCA to validate the product key in C# 2005 windows application. i am using the following C++ code in a dll to be added to the MSI for validation. [code] UINT __stdcall ValidateSerial(MSIHANDLE hInstall) { TCHAR szPidKey[PIDKEY_LENGTH]; DWORD dwLen = sizeof(szPidKey) / sizeof(szPidKey[0]); ///retrieve the …

0
93
Member Avatar for Queue

After writing out the main functionality for my templatized data structure, I am stumbling with the syntax to allow for Compare (so the user can provide a definition for less). If I am not mistaken, I need to add at least another constructor. I tried reading the STL implementations for …

Member Avatar for Queue
0
197
Member Avatar for balla4eva33

If I have a const char * of "bad,cold,new" how can I count just the number of commas? Do I need to convert it to string? If so, how do I do that? Do I need to convert all the commas to zeros first? How do i do that?

Member Avatar for balla4eva33
0
155
Member Avatar for White-Gandalf

Introduction: I already tried to post this on the dev-c++ - forum at sourceforge, but didn't check for the far too low frequency at that forum (about two questions per week). Thus i tried t find a better visited one and found this here. I use: Dev-C++ 4.9.9.2 Windows XP/SP2 …

Member Avatar for White-Gandalf
0
128
Member Avatar for Tell Me

hi may I bother you a moment :icon_redface: the follow program is without compilation error but whin I running , load error appear can you help me what is the error :( :( [CODE]#include <iostream> #include <string> using namespace std; bool function () { int ascii; string s1= "word" ; …

Member Avatar for iamthwee
0
84
Member Avatar for manster

I'm stuck because I recieve these errors when I try to compile - pim.cpp: In method `void PIM::search(class basic_string<char,string_char_traits<char>,__default_alloc_template<false,0> >)': pim.cpp:101: member `firstname' is a private member of class `Person' pim.cpp:101: member `lastname' is a private member of class `Person' pim.cpp:105: no matching function for call to `PIM::print (Person &)' …

Member Avatar for vmanes
0
185
Member Avatar for ryuhou

the questions is the following: Write a program that prints a table of the binary, octal and hexadecimal equivalents of the decimal numbers in a particular range the program should be somthing similar to the follow: 1. Convert a Decimal Number to Binary Number 2. Convert a Decimal Number to …

Member Avatar for zandiago
0
160
Member Avatar for kv79

#define ID_FILE_EXIT 40001 #define ID_FILE_OPEN 40002 And all other things like this which have these number .Which number i can use for my own ID 's ? And where i can find all of this? I try a MSND but it took me too much time so i ...?

Member Avatar for kv79
0
178
Member Avatar for nicz888

[code=c++] // Stopping input with an empty string #include <iostream> using namespace std; #include <cstring> int main() { int i = 1; char temp[80]; char string[80]; // room for 255 strings cout << "\n\nEnter some strings - (blank to exit)" << " \nfirst string: "; cin.getline(temp, 80); while (temp[0] != …

Member Avatar for neosomosis
0
124
Member Avatar for Fedien

Hello, so I'm a student in college and I'm new with C++ and I'm trying to make this program that allows me to read in names from a file, first name then last name, in Cstrings. Then I have to change it so that the output is "lastname, firstname". There …

Member Avatar for Salem
0
107
Member Avatar for alcoheca

Hi, I am storing strings in '|' delimited format in a text file. Each new line represents a new record. for instance [CODE]|Name|Age|Favcolour| |Name2|Age2|Favcolour2|[/CODE] I'm using a string vector to hold the tokens as they're pulled from the ifstream, However if one of the fields has not been filled in …

Member Avatar for alcoheca
0
92
Member Avatar for Nbkrooney

I am looking to make a small program that will cut down the repetetive need to insert BB tags in to achievements lists on a site I work for. So far I have got the algorithm sucessfully reading the first line of the file, and outputting it using cout. The …

Member Avatar for Lerner
0
161
Member Avatar for haelly

modularize program code by using functions. You will produce two solutions: a) using global access functions, and b) using classes and member functions. a) Using Access Functions Write five Invoice access functions: setInvoice(), computeAmount(), getAmount(), printData() and a global client function computeAmount(). Function setInvoice() has five parameters of types Invoice, …

Member Avatar for Narue
0
337
Member Avatar for rajatC

i want to calculate the exact run time of my program in [B]seconds[/B]....i used [B]clock() function of time.h library...[/B] what i did is that i made two [B]clock_t [/B]type objects... initialized one of them in the start of main() function and the other in the end.. and calculated the difference..as …

Member Avatar for Narue
0
190
Member Avatar for abhi_elementx

Hello folks! I have just joined this forum. This is actually my first Thread on the internet and need help with using STL sort function. I searched the forum but no related answer was found. Okay...here's my code; [CODE] #include<iostream> #include<vector> #include<algorithm> using namespace std; struct MyStruct{ int array[10]; }; …

Member Avatar for abhi_elementx
0
242
Member Avatar for tonyaim83

Hi.. I m working on Windows-Xp and building my project on Dev-cpp. The program compiles properly and i have also included the required dll file in the same folder of exe but when while running this application from command prompt it gives me following error message :- "[B]This application has …

Member Avatar for dubeyprateek
0
100
Member Avatar for manster

I'm clueless as to how to fix the errors in this contact information manager program. please help. Thanks in advanced [code=cplusplus] #include <iostream> #include <string> #include <fstream> using namespace std; struct Date { int month, day, year; }; struct Address { string street, city, state, zipcode; }; class Person { …

Member Avatar for Nick Evan
0
934
Member Avatar for likeno1

[B]How can I load an image to my code so i can make it as a background or I apply any function on it like rotate and scale only what I need is the function to load a(.jpeg or .bmp) and where to put it in my code[/B] #include "stdafx.h" …

0
60
Member Avatar for revenge2

hello there, i have been having some problems with dev c++. It just cant seem to compile my code. It says source file not compiled when i try to run the "compiled" program. Its like this;- i write my code (simple code stil beginner lol) and i go compile it …

Member Avatar for Nick Evan
0
82
Member Avatar for kv79

Hi to all, Function Information Minimum DLL Version user32.dll Header Declared in Winuser.h, include Windows.h Import library User32.lib Minimum operating systems Windows 95, Windows NT 3.1 How to use user32.dll in Dev-C++? Where to find User32.lib ? I tryed in C:\windows\and Dev-C++. Where is the diffrence in Header betwen Declared …

Member Avatar for kv79
0
81
Member Avatar for ArrogantLegend

[CODE] // War Game made by Jeremy Wayman #include <iostream> #include <cstdlib> #include <ctime> #include <fstream> #include <string> using namespace std; int cardValue[13] = {1,2,3,4,5,6,7,8,9,10,11,12,13}; // Declaring first array string cardType[4]; // Declaring second array ifstream inFile; // Declaring a reading inFile void displayRules(); // Declaring function displayRules bool winner(int …

Member Avatar for Ancient Dragon
0
88
Member Avatar for jrice528

In my program I am using the do-while loop to go through program.. my question is how do I loop the program without the do-while loop... rather that when the user enters menu number 0, it quits the program... Teacher uses a script to grade the programs and on hsi …

Member Avatar for WaltP
0
132
Member Avatar for stokey

I'm trying to get the program to loop back to the friends array and re-compare the two user inputs again and keep doing it until the 2nd input is the same as the first. We haven't covered this yet in my class but could someone help me to find this …

Member Avatar for stokey
0
98
Member Avatar for picklesandmayo

ok, so I have been working all day on this program and I am kinda stuck. The goal is to have a user input several words, then (ignoring case) alphabetize them (using [ICODE]qsort()[/ICODE] only) and count how many times each word was used. This is what I've got so far: …

Member Avatar for picklesandmayo
0
98
Member Avatar for weewee

Can anyone help me how to write the following codes in different ways. I used Linked List. template<class Item> ttt<Item>::ttt() { square=0; board=new node<Item>; for (Item i='9'; i>=1; i--) { list_head_insert(board,i); } } template<class Item> void ttt<Item>::clear() { list_clear(board); square=0; board=new node<Item>; for (Item i='9'; i !='0'; i--) { list_head_insert(board,i); …

Member Avatar for people123
0
960

The End.