49,761 Topics

Member Avatar for
Member Avatar for Swiftle

Hello there, I'm writing a dictionary that stores keywords and the pages which contain the keyword. This is a follow-up on a PageRank algorithm we're doing for an assignment. The first part is the read from a file containing all the web addresses and store the in a matrix, and …

Member Avatar for mitrmkar
0
140
Member Avatar for Cristofor

Hello, I installed Microsoft Visual Studio 2008 Express Editions last week. Then I found there are many head files missing, such as: matrix.h stdafx.h matlablink.h itpp/itcomm.h Should I uninstall Microsoft Visual Studio 2008 Express Editions and then install Microsoft Visual Studio 2008 Standard Editions? Is there free download version of …

Member Avatar for Cristofor
0
117
Member Avatar for cyfuzhi

Hi all, i'm writing this code that will prompt the user for a cstring of 25 chars...store it and prompt a char to find...then with a function search for that char from the cstring. i got it working with a while loop, but only if i enter a char thats …

Member Avatar for jonsca
0
70
Member Avatar for HealBrains

Hey all, I'm trying to do some ray intersection detection but I'm having some problems. My app starts by loading a cube object into a .x file. I have a player class and a target class that both use the same model, but each has it's own world matrix. [CODE]D3DXMATRIX …

Member Avatar for HealBrains
0
207
Member Avatar for faaz

The problem is that the program would not terminate if either the human or the computer reach 100 or above points. it is not displaying if the human wins that you won or if the computer wins then sorry you lost, try again. [CODE] #include <iostream> #include <ctime> using namespace …

Member Avatar for faaz
0
174
Member Avatar for KRal

/*The Fraction + and Fraction / are not being allowed to access private members declared in class Fraction. Any suggestions? */ [CODE]class Fraction { public: Fraction(); Fraction(int, int); void setNum(int); void setDen(int); int getNum(){return num;} int getDen(){return den;} void reduce(); void print(){cout << num <<"/"<< den;} friend ostream& operator << …

Member Avatar for mrnutty
0
135
Member Avatar for Kikazaru

Is there any way to reduce the number of times you have to write: template<typename T> for a bunch of functions all using the same template parameters? i.e., something like this: template<typename T> namespace my_functions_using_T { T function_do_something(const T & t); void function_do_something_else(T & t); } (besides making them all …

Member Avatar for Kikazaru
0
106
Member Avatar for lloydi12345

Hi, i really don't know what to do guys can you help me with this code for my matrix program? this program is not yet finished and i am stuck with this problem [CODE]#include <iostream> #include <math.h> using namespace std; int main() { int rotx, roty, rotz, n, ac1, ac2, …

Member Avatar for WaltP
0
126
Member Avatar for Volestar

Ok, I've been working on this for about 4 hours, but I cannot get it to work! I'm starting with a char, then I need it to become a const char so I can use strcmp in my if statements. If there's anything wrong in that idea, please tell me …

Member Avatar for WaltP
0
302
Member Avatar for iammfa

since few minutes I tried practice "using FOR loop with IF statement" to test user "Even Numbers"(divided / 2) in console screen, I wrote this trivial program to print the statement "IS even number" if the number divided by 2, and print "NOT even number" when not divided by 2, …

Member Avatar for WaltP
0
99
Member Avatar for delhiris

What is this->Controls->Add(color);? What will happen if code below is without this->Controls->Add(color);? What is the result from the code this->Controls->Add(color);? color=new Button(); color->Text="Ok"; color->Top=320; color->Left=420; this->Controls->Add(color);

Member Avatar for jonsca
0
80
Member Avatar for mybluehair

I hear that to create a custom icon for your exe file, and must create a .ico icon, then link it to a resource file, which is linked to the main .exe file. I'm not sure how to do this though. I have my icon I want to use for …

Member Avatar for HealBrains
0
96
Member Avatar for e40thrilla

I'm writing a simple program that reads a text file and counts the vowels in it and outputs how many are included. With the code I have I keep getting the wrong number of vowels outputted. Can anyone see where I made a mistake, I can't figure it out. my …

Member Avatar for mitrmkar
0
1K
Member Avatar for jonyb222

Arrival.o: In function `NodeItem': /home/jonyb/Desktop/A3-Q2/NodeItem.h:5: undefined reference to `vtable for NodeItem' Arrival.o: In function `~Event': /home/jonyb/Desktop/A3-Q2/Event.h:8: undefined reference to `NodeItem::~NodeItem()' Event.o:(.rodata._ZTI5Event[typeinfo for Event]+0x8): undefined reference to `typeinfo for NodeItem' These 3 errors repeat themselves for all my files accessing NodeItem.h and NodeItem.cpp Now I've looked around and all I could …

Member Avatar for jonyb222
0
8K
Member Avatar for tomtetlaw

The function, std::vector.push_back takes a paramater of the type: [const t &]. with t being the type that the vector was constructed with. What I need to do is convert [*this] to a [const t &]. Is there any way that I can do this? This is the code that …

Member Avatar for tetron
0
97
Member Avatar for picaz

I am trying to get 'SERVERPROPERTY ('edition') using ADODB. I have a connection to a database but I keep getting Error 80040e14 and unexpected token SERVERPROPERTY was found following BEGIN-OF-STATEMENT. Any ideas how to fix this. Thanks Joey

0
74
Member Avatar for vidit_X

Question by ~s.o.s~ Write a program which will perform the job of moving the file from one location to another. The source and destination path will be entered by the user. Perform the required error checking and handle the exceptions accordingly. (Intermediate) [code=c++]#include<fstream> #include<iostream> #include<cstdio> using namespace std; int main(){ …

Member Avatar for mrnutty
0
378
Member Avatar for charmed14

So, I'm trying to create a Caesar Cipher using C++. It's supposed to be able to calculate the shift depending on what letter appears the most (which would mean that it's "e"). It's also supposed to have wrap around text, which I've tried to think of a way to have …

Member Avatar for VernonDozier
0
100
Member Avatar for jonyb222

Good evening Daniweb, I have another idiotic problem which comes from making an arrival subclass out of Event. I have a few other subclasses of Event and they aren't giving me any trouble. I have tried to copy/paste/rewrite to eliminate any stupid typos. Arrival.h:7: error: expected class-name before ‘{’ token …

Member Avatar for jonyb222
0
553
Member Avatar for cog_bn

Hi, I've got a problem with a program that boils down to strange behavior by the vector container class. It seems to not want to call constructors enough but calls destructors too many times: [CODE] #include <vector> #include <iostream> using std::cout; int constructor_count=1,destructor_count=1; class obj{public: obj(){ cout<<"C: "<<constructor_count++<<'\n'; } ~obj(){ …

Member Avatar for vijayan121
0
631
Member Avatar for greatunknown

What is the best way to add something to the nested vector of a multidimensional vector...I already have ints inside, lets say VECNAME[rowone][columntwo]...How can I add to columntwo???

Member Avatar for greatunknown
0
77
Member Avatar for programer411

Hi I am supposed to write that implements a simple version of the BucketSort algorithm the only problem is I have no clue what that is. Any tips and examples on this would be awesome Thanks

Member Avatar for programer411
0
149
Member Avatar for p.jeet

Hello, I am runing this program this works if I dont delete anything in destructor. If I use delete variable name in destructor then it creates problem. It creates problem when destrctor get called while operator ovrerloading. I think It is trying to delete the memory that has already been …

Member Avatar for p.jeet
0
92
Member Avatar for XiaO yuEn
Member Avatar for Ancient Dragon
0
69
Member Avatar for kavithabhaskar

Hello Folks: I had previously posted this problem and someone on this forum suggested that i used s[i] == 'a' || s[i] == 'A' .... but what I have here completely makes sense.. Can you please take a look at it ? [CODE] #include<iostream> #include<string> using namespace std; int main() …

Member Avatar for kavithabhaskar
0
92
Member Avatar for sexyzebra19

My program keeps crashing and I can't see why, if I remove the line [code=php] myfile << data_[i+ndim_*j] << " "; [/code] then it runs OK...but can't see anything wrong with this line? [code=php] void Matrix::WriteToFile(std::string fname) const { ofstream myfile; myfile.open ( (fname+".txt").c_str() ); for (int i = 0; …

Member Avatar for sexyzebra19
0
100
Member Avatar for sexyzebra19

My function is: [code=php] void Matrix::WriteToFile(std::string fname) const { ofstream myfile; myfile.open ("std::string fname.txt"); for (int i = 0; i<data_.size(); i++) myfile << data_[i] << " "; myfile.close(); } [/code] and then in the main I have A.WriteToFile("hello"), but it's saving it as fname still? Can anyone please tell me …

Member Avatar for sexyzebra19
0
306
Member Avatar for bigdog1

Write a program that will read in 10 test scores. Print out all 10 scores, then print the highest score, and then the lowest score. Ok i got this so far but i do not know how to print the highest or lowest. [code] #include<iostream> using namespace std; int main() …

Member Avatar for Nick Evan
0
258
Member Avatar for Anarionist

I wish there was an option in the "What are you posting" for tutorials hehe. But I guess I will just have to right it here :). If anyone else has any pointers (pun intended) let me know ;). Ok if your like me and were wondering how to accept …

Member Avatar for Nick Evan
-1
98
Member Avatar for pixelerator
Member Avatar for pixelerator
0
109

The End.