49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
/*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 << … | |
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 … | |
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, … | |
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 … | |
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, … | |
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); | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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(){ … | |
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 … | |
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 … | |
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(){ … | |
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??? | |
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 | |
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 … | |
| |
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() … | |
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; … | |
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 … | |
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() … | |
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 … | |
|
The End.