Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
4
Posts with Upvotes
3
Upvoting Members
4
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
0 Endorsements
Ranked #3K
~3K People Reached
Favorite Forums
Favorite Tags
Member Avatar for aravind rao

Hi I am developing a program that uses Breadth First Search to map a grid(2d array) out. Breadth First Search involves storing nodes in a stack and then exploring these nodes based on Breadth or level. I know how to create a vector array which I shall use as a …

Member Avatar for aravind rao
0
172
Member Avatar for RFID46616c73

Doing this project 1 step @ a time but the multiple files are starting to get confusing. Lemme start by telling you all what I need to do, then show you what I've done, and then maybe you can tell me if I'm on track with this or if I …

Member Avatar for RFID46616c73
2
974
Member Avatar for majeissh

Hi. Could you please guide me in performing operator overloading of Unary operator? Just explain the method with an example. Please add the explanation.

Member Avatar for Fbody
0
220
Member Avatar for MarounMaroun

Hello folks, I have this header file: [code=c]class Agent { private: struct AgentStruct { std::string agentName; double pID; double mID; AgentStruct *nextAgent; } *AgentP; public: Agent(std::string); void SetNextAgent(AgentStruct*); Agent* GetNextAgent(); void SendMessage(); void ReceiveMessage(); };[/code] and I have the implementation here: [code=c]/* * The constructor we are required to implement. …

Member Avatar for mike_2000_17
0
140
Member Avatar for Dark Byte

I have viewed some source that contained an identifier with a scope operator preceding it. Ex: [code=c++] ::var[/code] What does that mean/do?

Member Avatar for LordNemrod
0
113
Member Avatar for Stefano Mtangoo

Seeing we can do it with structs, why do we need classes? See the code and quote from [URL="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlcpp8a.doc/language/ref/cplr054.htm"]Link[/URL] [QUOTE="IBM Developer"]The C++ class is an extension of the C language structure. Because the only difference between a structure and a class is that structure members have public access by default …

Member Avatar for LordNemrod
0
98
Member Avatar for vbx_wx

[code] #include <iostream> #include <cstring> void rev(const char* str) { char* p = new char[strlen(str) + 1]; for(int i = 0; str[i] != '\0'; i++) { p[i] = str[strlen(str) - i]; } p[strlen(p) + 1] = '\0'; std::cout << p; } int main() { const char* s = "vBx"; rev(s); …

Member Avatar for LordNemrod
0
186
Member Avatar for syd919

hello i am having a little problem, I cant convert a double to one decimal place: here is my code [code=c]for(int i=0; i<marklist.size();i++) { double result=floor((marklist.at(i) /maxmark)); cout<< result<<endl; } [/code] I want result to be one decimal place

Member Avatar for syd919
0
163
Member Avatar for vbx_wx
Member Avatar for hurbano

Ive written this program yet have stumbled upon a problem. in this program, im supposed to make a linked list of students. i must then implement some basic functions. one is to add a student (which i believe is working properly) and another is to getStudent. i believe the code …

Member Avatar for hurbano
0
97
Member Avatar for delle

I wrote a little test program to try to figure out some problems I am having in another program I'm working on. Code: [CODE]# include <iostream> # include <string> using namespace std; void ahoy(string nameEntered) { cout << "Ahoy, " << nameEntered << "!" << endl; } int main() { …

Member Avatar for Duki
0
202
Member Avatar for onako

I wonder whether there is a faster way (faster then the obvious one a=a*a) to square the content of a vector of floats. I remember that bit shifting could be used somehow, but I'm not sure whether this works for floats. Any suggestions on how to achieve this are welcome …

Member Avatar for NathanOliver
0
75
Member Avatar for onako

My templated function look as follows: [code] template <typename MatTypeOne, typename MatTypeTwo> void funct(MatTypeOne& m1, MatTypeTwo& m2) { //here I would need to check whether m1 and m2 are of the same "type", //meaning that MatTypeOne is the same as MatTypeTwo } [/code] What is the way to check whether …

Member Avatar for LordNemrod
0
112
Member Avatar for XodoX

It's a program that works sort of like a lexical analyzer, but it's just supposed to pull any given data from a .txt file and display it. Nothing else. I'm not satisfied with the array I have so far. /**************************************************************** Array holding all keywords for checking. *****************************************************************/ char *keywords[]={"procedure","is","begin","end","var","cin","cout","if", "then","else","and","or","not","loop","exit","when", …

Member Avatar for LordNemrod
0
101
Member Avatar for rtdunlap

[CODE] #include <iostream> using namespace std; int main() { char a = 0, b = 1, ch1, ch2, ch3, ch4, chsum; float num1, num2, num3, sum, avg; cout<<"Enter Character 'a' or 'b': "; //asking user to enter character a or b cin>>ch1; if (ch1 == a) { cout<<"Enter three floating-point …

Member Avatar for LordNemrod
0
122
Member Avatar for ganesh_IT

Hi guys, what is the deference between ASSERT macro and Exception handling in cpp

Member Avatar for LordNemrod
0
72