49,761 Topics

Member Avatar for
Member Avatar for daviddoria

I am trying to use OPT++ for multidimensional optimization with Visual Studio 2005. I added the include directory to my project. I added the lib directory to my project. When I try to compile the example that ships with the package, i get 102 of the same error: NEWMAT is …

Member Avatar for zhelih
0
168
Member Avatar for Barbarrosa

Hey guys, I've been working on a poker hand recognition assignment and ive been playing around with it for a week getting one problem after the next. Below is my code I have so far. [CODE=cplusplus]#include <cstdlib> #include <iostream> #include <string> #include <fstream> #define iteration_max 10000000 using std::cin; using std::cout; …

Member Avatar for VernonDozier
0
124
Member Avatar for Lutzee

Hai, This is something to save me and osme other people some time. Basically i need to read data from a text file and put that data in a a web form. It will be easy to read the text file but I don't know how to stuff that information …

Member Avatar for Ancient Dragon
0
83
Member Avatar for mrjoli021

I have an array that I need to make into an array of pointers and return the array. [code] string words[i] = { "when", "if", "as if", "in order that", "before", "because", "as soon as", "after", "although", "as long as", "since", "unless", "even though", "so that", "while", "not even" }; …

Member Avatar for Ancient Dragon
0
88
Member Avatar for Cyb3rAssasin

Microsoft has a program called narrator that reads text displayed on the screen. Is there a way I could use this voice? I want to create a program that makes the voice say whatever is typed. So if I type hello then press enter it will say hello. Is there …

Member Avatar for vijayan121
0
85
Member Avatar for Iqbal_h_a

Hi All, I have a doubt regarding "threadsafe". Consider the following scenario.... [inlinecode] Thread #1: fun1() { lock(); writestring(ptr, pconfig); unlock(); } Thread #1: fun2() { lock(); writestring(ptr, pconfig); unlock(); } bool writestring(char *ptr, char *pconfig) { //this code should not be shared across threads. One thread should access at …

Member Avatar for Ancient Dragon
0
94
Member Avatar for daviddoria

Anyone know a good package that will take a multidimensional function and find its minimum? I can't get opt++ to work under windows. My function is not analytic so the package should have numerical gradient stuff built in. I had no idea this would be so hard to find!

0
50
Member Avatar for shadowfire36

i m trying to build a turn based text game but im kinda of confused on the menu's ok here is my issue i want to have 4 menu's in my game menuDisplay selectMenu fightMenu shopMenu now what i want is the menuDisplay to be the welecome menu where the …

Member Avatar for lAmoebal
0
114
Member Avatar for birdy_28

Hi Guys/ girls. I have written a small program for uni, and it involves the user inputting a message that is saved into a string. The only problem is that whenever i use a space within the message the whole program crashes. Can anyone help, i have given the code …

Member Avatar for vijayan121
0
83
Member Avatar for sudhirblgupta

Hi I am trying to display list of codec installed on windows xp through c or c++ program. can any buddy give me idea how I can do it?

0
58
Member Avatar for rathmal

please help me to write algorithms in c++ such as OPT,LRU and FIFO algorithms in memory management

Member Avatar for tarakant_sethy
0
67
Member Avatar for abarnett

Greetings! I am new to the Daniweb community but hopefully you all can help me out with this problem! I am to write a c++ function, smallestIndex that takes as parameters int array & its size and returns the index of the smallest element. then I have to write a …

Member Avatar for highspeedhook
0
3K
Member Avatar for birdy_28

Hi Guys/ girls. I have written a small program for uni, and it involves the user inputting a message that is saved into a string. The only problem is that whenever i use a space within the message the whole program crashes. Can anyone help, i have given the code …

Member Avatar for VernonDozier
0
243
Member Avatar for sauron84

hello, am very new to VC++ programming. I have designed an interface on VC++ using MFC. the visual part is now ready and i need to append my C++ codes to the interface and compile it as a program. I've been trying so far but nothing good came out :s …

Member Avatar for John A
0
90
Member Avatar for taotesea

Open CSV File ,error Code _ConnectionPtr m_adoConn; _RecordsetPtr m_adoRec; ::CoInitialize(NULL); m_adoConn.CreateInstance(__uuidof(Connection)); m_adoConn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\1.csv;Extended Properties=csv;HDR=Yes;FMT=Delimited","","",adModeUnknown); m_adoRec.CreateInstance (__uuidof(Recordset)); m_adoConn->CursorLocation = adUseClient; m_adoRec->Open("select * from c:\\1.csv",m_adoConn.GetInterfacePtr(),adOpenDynamic,adLockOptimistic,adCmdText); error message: Unknown error 0x800A0E7D thank :)

0
38
Member Avatar for knewc

I am very new to C++, and am struggling with these problems. I must enter in a 10 integer array, and then reverse the array. I do not want to make a function, or use characters, just simple code, this is what I thinking is along the lines of the …

Member Avatar for nezumi4
0
101
Member Avatar for mrjoli021

I have some sentence fragments and some words. I need to print out sentence1 + word + sentence2 capitalize the first charater in sentence1. Then, sentence3 + word + sentence4 capitalize sentence right now it is printing the first sentence capitalized + word + second sentence second sentence not capital …

Member Avatar for Ancient Dragon
0
94
Member Avatar for BBallAsh23

My first issue was getting it to open and read the text file contents... Woot it does that. Compiles fine, no errors. However... When it gets to the CalcRate, GrossPay, Display... it goes down hill and display mem locations. Any advice... And I still have another program to code... I …

Member Avatar for BBallAsh23
0
151
Member Avatar for mrjoli021

I am tring to compile this simple string array. I am getting some struct error. "Cannot pass object of non-POD type in line 63. which is "printf("%14d%10d\n",array[i][1], array[i][0]);" please help [code] #include <stdlib.h> #include <time.h> #include <string> #define row 15 #define col 2 using namespace std; void PrintArray(char *Title, string …

Member Avatar for Ancient Dragon
0
98
Member Avatar for mrjoli021

I need to get a string array and add a random number to it then sort it. What is the easiest way of doing this. do I need to convert the last element which will be the random number to an int then sort it that way or how.

Member Avatar for Ancient Dragon
0
97
Member Avatar for Joatmon

I created a snake game using objects of snake segments that act together in a linked list type way (I think.) and I notice that when you select quit after you die with more than 2 links, the program throws some run time error. Even funkier, when I used a …

Member Avatar for Joatmon
0
115
Member Avatar for Jennifer84

I have Added a new item to a FormProject in VC++ .NET. This is an includerFile (OneFile.h) On Form3 I have #include "OneFile.h" and in OneFile.h I have only written this: [I](Nothing else is written in OneFile.h)[/I] [code] #define Macro1 Time == Value [/code] This macro works fine using it …

Member Avatar for Jennifer84
0
143
Member Avatar for jnabeel

compare two value in oop based programing #include<iostream> using namespace std; class com { private: int a; int b; public: int d() { cin>>a; return 0; } int bd() { cin>>b; return 0; } }; int main() { com c1; if(c1.d()==c1.bd()) { cout<<"y"<<endl; } else { cout<<"n"<<endl; } return 0; …

Member Avatar for jnabeel
0
110
Member Avatar for mhilleleonhart

Please help me about sorting an array... program should accept an input of numbers 5-10. and those input number should be sort from smallest to biggest numbers using the array sorting. Using C++, I really appreciate it if someone could help me solve this problem...:'(

Member Avatar for sarehu
0
58
Member Avatar for phumzk

Hi I have been searching for a way to write pixels into the canvas but can't seem to find a way. I have this assignment to read an image(BMP,PGM) but have to do it from first principles as in read the header to get the type of image, then read …

0
43
Member Avatar for kiwihaha

if i initialize x=65. it can show A (ascii code 65 is A). but 167 cannot.. why? [CODE]#include <iostream> using namespace std; main() { char x=167; cout<<x<<endl; system("pause"); return EXIT_SUCCESS; }[/CODE]

Member Avatar for Ancient Dragon
0
2K
Member Avatar for hockeyplayer051

Hello, I had a question about a CS program. We were asked to write a program for a file that reads mail.dat and output all string containing the "@" sign to file adresses.dat. We are supposed to use strings for this.. My thoughts are that we should go invididually, character …

Member Avatar for vijayan121
0
115
Member Avatar for cynthann

Hello Please help. I am having a hard time making the leap from where I am to then picking out numbers (in this instance adding even numbers). Any suggestions or pointers would be greatly appreciated. #include <iostream> using namespace std; // program computes the sum of all even numbers from …

Member Avatar for ruhneb03
0
156
Member Avatar for winky

Hey guys I'm attempting to create a binary tree using pointers and then be able to do functions like post-order, pre-order, etc. Anyways, I am having problems with getting the functions to work with a user input. I'm relatively new to structs, but I think from the tutorials I have …

Member Avatar for mitrmkar
0
120
Member Avatar for mazoo

Hi , I'm trying to use elclipse as an IDE to write my college code . I've downalod the version eclipse-cpp-europa-winter-win32 from the website ... the problem is , when I create a project ( c++ project ) [CODE]#include <iostream> using namespace std; int main() { cout << "Hello World!" …

Member Avatar for VernonDozier
0
112

The End.