51,593 Topics

Member Avatar for
Member Avatar for RossSCann

Does anyone know a source dealing with what is now required to get your application to install and run on Vista and avoid being blocked with the "Unknown Publisher" warning. It seems for 64 bit Vista my app simply won't run. I use an older version of Visual C++ to …

Member Avatar for RossSCann
-1
126
Member Avatar for dpreznik

Hi, Maybe somebody could help me set a popup menu item text at runtime in MFC? Because of some reason, the following code doesn't work for me: [CODE] if(pDoc->m_pCurChapter->m_pMarkedParagraph->m_bFlagged) menu.GetSubMenu(0)->ModifyMenu(ID_FLOATING_MENU_FLAG_PICKUP, MF_BYCOMMAND|MF_STRING|MF_POPUP, ID_FLOATING_MENU_FLAG_PICKUP, "Unflag Pickup"); else menu.GetSubMenu(0)->ModifyMenu(ID_FLOATING_MENU_FLAG_PICKUP, MF_BYCOMMAND|MF_STRING|MF_POPUP, ID_FLOATING_MENU_FLAG_PICKUP, "Flag Pickup"); [/CODE]

0
52
Member Avatar for erialclaire_238

Need suggestions if I should be using string so i could get this output: xcomputers 0123456789 user must enter characters... sample: enter characters: tr.xx equivalent: 68.00 where x=0,c=1,o=2... and so on... i'm not sure how to use the string so my output is always the conversion of first character i …

Member Avatar for Grn Xtrm
0
109
Member Avatar for hao001

[CODE]#include <iostream> using namespace std; int main() { cout << "Enter the number of students: "; int numberOfStudents; cin >> numberOfStudents; double score = -1; for (int i = 0; i < numberOfStudents; i++) { cout << "Enter a student score: "; int score1; cin >> score1; if (score < …

Member Avatar for JasonHippy
0
5K
Member Avatar for trac15

I am working on a project to solve a class in polynomial. I have successfully managed to do the header file and 75% of the code..but two functions to write and add the polynomials don't seem to work. Can someone help? The last part of the code! [CODE]#include <cassert> #include …

Member Avatar for iamthwee
-1
161
Member Avatar for hao001

[CODE]for(int i=5;i>=1;i--) { for(int j=5-i;j>=1;j--) { cout<<" "; } for(int k=1;k<=i;k++) { cout<<"* "; } cout<<endl; }[/CODE] sorry but can someone explain this coding to me? T.T''

Member Avatar for hao001
0
92
Member Avatar for Wolf CCMLG

I am desperately need help converting my code into an OOP format. [B][I]Here is my code:[/I][/B] [CODE] #include <iostream> #include <string> #include <cstring> using namespace std; const int strLength = 141; char strArray[strLength]; char answer; bool quit; int charAmount; string line; void vowelCount(string); void consonantCount(string); void consonantCount(string line) { int …

Member Avatar for dkalita
0
188
Member Avatar for kahaj

I've been trying to look up an answer to this online, before having to post it to the board. All I've managed to do with what little info I've dug up is to confuse myself. How does one go about accessing some sort of standard dictionary for C# (or .NET …

Member Avatar for vinnijain
-1
128
Member Avatar for hollywoood69

I am having a problem writing from a outside file. here is the assignment. Write the program as an object-oriented C++ program that allows the user to select which way they want to calculate a mortgage: by input of the amount of the mortgage, the term of the mortgage, and …

0
72
Member Avatar for geg13

i would like help with the template i am writing for some reason i can't get it to work. I would appreciate help. [CODE]#include <iostream> using namespace std; #include <iomanip> int() { cout << "This is a template.\n"; system(pause) }[/CODE]

Member Avatar for geg13
0
91
Member Avatar for adi.shoukat

Hi, I've been working in C++ and java .... i m fond of using String data type .... but in C I've to use char array as string and have to pass it to a function as string its creating some confusions plz help [CODE] void function( charArray comes here …

Member Avatar for Ancient Dragon
-2
155
Member Avatar for Wolf CCMLG

Can someone help me please, I am getting this error: [B]stringdefinition.cpp(7) : error C2448: 'stringClass::wordCount' : function-style initializer appears to be a function definition[/B] When trying to compile this code: [B][U]StringHeader.h[/U][/B] [CODE] #ifndef H_StringHeader #define H_StringHeader #include <iostream> #include <string> #include <cstring> #include <algorithm> using namespace std; const int strLength …

Member Avatar for Wolf CCMLG
0
156
Member Avatar for Rastafari

Hi, I have this code fragment that is suppose to find the max value in a queue. It seemed to work fine until I switched up the locations of the letters being fed into the queue. It is suppose to compare each element of the queue and return the largest …

Member Avatar for Rastafari
-1
88
Member Avatar for uzimuzi

[code] #include<iostream>; using namespace std; int main(){ char arr[8]={}; for(int count(0); count<=7; ++count){ arr[count]='*'; } cout<<arr; cin.get(); return 0; } [/code][code]I really do not understand how some garbage values get stored into the array; even after I have initialized it properly; and how it can display MORE values than what …

Member Avatar for uzimuzi
-1
332
Member Avatar for ankit894u

Using a hash table with eleven locations and the hashing function h(i) = i%11, show the hash table that results when the following integers are inserted in the order given: 26, 42, 5, 44, 92, 59, 40, 36, 12, 60, 80. The collisions are resolved using chaining. int h(int i) …

Member Avatar for ankit894u
1
236
Member Avatar for nated

Ok im passing in a string and i cant get it to convert to a char array. Ive tried this so far. [CODE]int MyString::find(const std::string& str) { char* newString = str; return 1; }[/CODE] Im pretty lost here.

Member Avatar for nated
-1
131
Member Avatar for Bemani_lover

Ok, so I've been trying to some practice programs and have come to a slight problem. Here's the program I need to work on: Write a program that determines which of a company's four divisions (NE, SE, NW, SW) had the greatest sales for a quarter. It should include the …

Member Avatar for VernonDozier
1
167
Member Avatar for nated

Ok im trying to compile and keep getting this error: 38 ISO C++ forbids declaration of `string' with no type. Not sure what im doing wrong. Here is my code: my header file: [CODE]#ifndef PLAYER_H #define PLAYER_H #include <iostream> using namespace std; class MyString { public: int find(const string& str); …

Member Avatar for nated
1
50
Member Avatar for NICEGUY123

I need help in understanding how input file in C++ works. Here is what i need to do. I need to be able to open a input file called input.txt. That file will contain 15 numbers in a list format. 6 .34 74 34 12 31 23 . . . …

Member Avatar for NICEGUY123
-1
207
Member Avatar for Juliebadeya

Please help me in this homework. /* mortgage -- calculates the amount of a monthly mortgage payment based on the * principal (i.e., the amount borrowed), the annual percentage rate (APR), and * the number of years to payoff the loan. Prints an amortization schedule (table). * * The program …

Member Avatar for William Hemsworth
-1
1K
Member Avatar for realmayo

Hi, I have a bit of a complicated problem I have a class (Holder) with 4 arrays (arr1, arr2, arr3, arr4). Currently I have a class function which processes these arrays so I dont have to return anything since they are part of the class. But I need to port …

Member Avatar for realmayo
-1
99
Member Avatar for mybluehair

I have a game that requires me to save alot of info to a txt file. The problem is, I must store all the individual things into separate txt files because I have no idea how to get c++ to read individual lines of a file. For example - I …

Member Avatar for csurfer
-1
141
Member Avatar for b1t.flash0r
Member Avatar for Web_Sailor

Hi.. Suppose I have a multimap like below [CODE] multimap<string, int> m; m.insert(pair<string, int>("a", 1)); m.insert(pair<string, int>("c", 20)); m.insert(pair<string, int>("b", 3)); m.insert(pair<string, int>("b", 4)); m.insert(pair<string, int>("a", 5)); m.insert(pair<string, int>("b", 6)); [/CODE] I want to print a output flags for first element, middle element and last element for multi map. Like …

Member Avatar for Web_Sailor
-1
183
Member Avatar for dzhugashvili

I currently am using the optimized scaler 32-bit md4 and md5 implementations from here: [URL="http://freerainbowtables.com/phpBB3/viewtopic.php?p=8454#p8454"]http://freerainbowtables.com/phpBB3/viewtopic.php?p=8454#p8454[/URL]. I am get ~8.1million hashes/second for md4, ~6.6million for md5. I am looking for a sse2-accelerated implementation for core 2, primarily md5 - which is easy to implement and at the very least twice as …

Member Avatar for dzhugashvili
-1
147
Member Avatar for Peppercat101

Hi, Im new to c++ and Im struggling with something. I have a load of classes that all connect to each other. I globally overloaded the << operator for each class. So in my main I do the following: [CODE] FixedSizeMatrix y(5,5); cout<<y; cout<<y; [/CODE] The first cout works fine …

Member Avatar for mrnutty
0
128
Member Avatar for alvalany

hi friends, recently I came o know about internet bots.Can someone help me in creating a simple web BOT for tasks like automatically signing in into my gmail account,sending a particular email to all my frnds,then in orkut checking for any visitors and giving the list to me in a …

Member Avatar for SpaceTiger
-1
290
Member Avatar for Daithi

I'm stuck on the very last part of a problem. [I] You've bought a square plot of land on ebay and you now want to plan how to develop this land. The trouble is, you've never been there. All you have is the engineer's terrain report which is an NxN …

Member Avatar for VernonDozier
2
141
Member Avatar for Peter_APIIT

Hello to all, i have coded an observer pattern [CODE] class IObserver; class ISubject { public: public: ISubject(); virtual ~ISubject(); virtual void RegisterObserver(IObserver*) = 0; // Observer only interest in certain aspect virtual void RegisterObserver(IObserver*, bool) = 0; virtual void UnRegisterObserver(const IObserver*) = 0; // An Observer with 1 subject …

Member Avatar for Peter_APIIT
-1
77
Member Avatar for pymatio

I have an idea for a gui application: 1) the user can enter the error they are getting &/or the programming language & the program will search a database for the error & display code, reasons for it 2) the user can enter something like "class" & "c++" into the …

Member Avatar for pymatio
1
57
Member Avatar for SilverRayX

Hi all, im doing an assignment for school and have bumped into this error that I been working at the past 4 hours without success first of all a little background knowledge, there are two classes in this , Record and Database and i'll include the private datas here template …

Member Avatar for kvprajapati
-1
91
Member Avatar for tkud

Please i need a free good c++ book. Please i need help! i have read john smiley's book and i admit it is a good book but it does not have all i need a book that has all thanx

Member Avatar for kvprajapati
-2
86
Member Avatar for sonygamer

[CODE]int found=false; int first=0; int last= arraysize-1; int count2=0; while(first<=last && found==false) { int loc=(first+last)/2; if(key<sorted_array[loc]) last=loc-1; else { if(key>sorted_array[loc]) first=loc+1; else if(key==sorted_array[loc]) { first=loc+1; count2++; } else found=true; } } cout<<"the number of students with this grade are: "<<count2<<endl;[/CODE] I have already sorted an array of size 100 so …

Member Avatar for WaltP
-1
104
Member Avatar for taphofyle

I am new to this and maybe I'm missing the boat. I want to learn how to write a program that accepts data and adds it to a file, I also want to be able to sort that data, edit that data etc. This seems like the most basic thing …

Member Avatar for Frederick2
-1
174
Member Avatar for sebassn

When I run the code, it works till the part where it asks about the dog's bredd, I press enter and it asks me about the dog's name, that's not supposed to appear. And also, when I enter the weight and press enter nothing happen, it's supposed to give me …

Member Avatar for WaltP
-1
122
Member Avatar for scantraXx-

Hey guys. I need help on how to find the largest/smallest position in a set of vectors. Because I'm using vector<bool> type.. the elements in my vector are either 0's or 1's.. therefore what I need to do: 1. find out what position they are at (all the 1 values) …

Member Avatar for scantraXx-
-1
134
Member Avatar for Kimmelivim

I have an assignment where I enter a maximum of 100 values. I need to be able to cancel the input when I want. [code=cpp] #include <iostream> #include <iomanip> #include <stdlib.h> using namespace std; void main() { const int value=100; double middle, highest, lowest, sum = 0; double counter[value + …

Member Avatar for vmanes
-2
115
Member Avatar for BeyondTheEye

I've created a class, Category. [CODE=cpp]#ifndef CATEGORY_H_INCLUDED #define CATEGORY_H_INCLUDED #include <string> using std::string; enum Type {Integer, Double, Bool, String, Date, Time}; class Category { public: Category() : itsType(String) {} Category(Type type) : itsType(type) {} Category(string name) : itsName(name) {} Category(Type type, string name) : itsName(name), itsType(type) {} ~Category() {} void …

Member Avatar for mrnutty
0
98
Member Avatar for blamp

I have finished all the functions except one. I need help with writing a boolean function to determine if the magic square is a magic square. I don't completely understand boolean functions so any help would be appreciated. Thank you[code]#include<iostream> using namespace std; #include<fstream> //load the array void load2D(int &n, …

Member Avatar for blamp
-2
143
Member Avatar for James19142
Member Avatar for James19142
Member Avatar for virtualmisc

I want to find the product of two matrix using a function without using for loop? Help is really appreciated.

Member Avatar for mrnutty
-2
111
Member Avatar for tomtetlaw

Would this do any damage if I left it running for a while: [code=c++] int main(){ while(1) new char[0]; } [/code]

Member Avatar for VernonDozier
0
146
Member Avatar for ramsdellcp

[code=c++] #include "stdafx.h" #include <time.h> #include <stdlib.h> #include <iomanip> #include <iostream> #include <string> #include <fstream> #include <cmath> #include <stdio.h> #include <cstdlib> #include <sstream> #include <vector> using namespace std; int main(); class Hangman { public: void set_values (string, string, string, string, string, string, string, string, string, string, string, string, string, string); …

Member Avatar for Ancient Dragon
-1
81
Member Avatar for James19142
Member Avatar for James19142
-1
346
Member Avatar for inspiron630

I'm trying to remove memory leaks from my program, but I am new at this so I'm not sure how to do so on the follow code of mine. I think that I need to free insertedNode but I'm not sure how: [code] BSTNode * BST::Insert(const std::string & v, BSTNode …

0
33
Member Avatar for m4design

I'm trying to finish this assignment, but I got this error. "subscripted value is neither array nor pointer" Here are parts of the code. [CODE] typedef enum { BOAT = 178, SEA = 250} Appearance; typedef struct { Appearance appear; } Square; typedef struct { Square ** grid; int size; …

Member Avatar for mrnutty
-1
120
Member Avatar for NordCoder

Hi Daniweb Community :), I'm working on an SDL/C++ project, using the VC++ IDE. There is too much code to put it on here, but I'll give you an outline: The program works, but there is one thing that doesn't. The resulting .exe file shuts down immediately when it is …

Member Avatar for NordCoder
-1
2K
Member Avatar for dirnthelord

I was trying to implement a queue using linked list and the problem is when i try to call dequeue() method, nothing shows up and no errors too. just NULL values for all nodes. take a look @ this code and tell me if there is anything wrong... ps. Do …

Member Avatar for dirnthelord
0
214
Member Avatar for nated

So im just trying to understand a simple program in C++ but i keep getting an error when trying to compile this code. The error is [Linker error] undefined reference to `Player::getHeight()' . So i have my main code in one file called Main.cpp: [CODE]#include "Player.h" int main() { Player …

Member Avatar for sfuo
0
139

The End.