49,757 Topics
| |
I'm trying to traverse to the end of a linked list, but I get a segmentation fault when my while loop checks to see if the "next" pointer is null. Any suggestions on how to perform this check without causing a segmentation fault would be greatly appreciated. | |
Hello, I need to implement the following situation in C++: I have a counter which I want to increment with a certain probability. I am giving a pseudo code which will clear: counter = 0; prob = 0.5; for i <- 1 to 100 if(prob) // want to increment the … | |
Hi for ever can any one help me [COLOR="Red"]only give me idea[/COLOR] of this question Write a program that reads from a file list of unsorted names and sort the names automatically and then asks the user whether he/she would like to print the names in the output screen or … | |
Hi I am making a program that takes in a date (dd mm yyyy) & returns the day of the week(eg monday) of the input date. My problem is that my fuction [B]day_of_week[/B] is not returning the variable [B]dayString[/B] into main. So dayString is not being output in main. Any … | |
Hi, Hoping someone can tel me where I'm going wrong, or what I should do. I'm trying to use some pure virtual functions on some polymorphic classess but am unsure how to do it correctly. Hiopefully this code will explain it a bit better: vehicle.h : [code=C++] using namespace std; … | |
it keeps saying theres an error on line 17, it says: "no match for 'operator!=' in 'a != password'" [CODE] #include <iostream> #include <cstdio> #include <cstdlib> using namespace std; int main() { string password; cout << "Type in a password: "; cin >> password; char a; a = 'A'; cout … | |
Hi . What is the problem of this : template < typename B > ostream &operator << ( ostream &out, const Array < B > &a ) The compiler say "Link error" and ... | |
I made a program in Visual Studio that reads an End-Of-File signal. When you run in the debug mode, sending the signal closes the program. Running without debugging with ctrl + F5 means you can send the signal. However, when I compile in release mode and run the exe it … | |
I am writing a program to compute the fastest/shortest path between locations (stored in a directed graph represented by an adjacency list). I am trying to create this adjacency list ("al") as an array of pointers to Vertex class objects, but I get the error " 'al' was not declared … | |
Hi all, I asked about this question few days ago, and I have tried few things other experts told me I think i got overcame problem where i can read the tab spaced file but now the output is the problem..... When i run my program it outputs: Enter filename: … | |
could anyone tell me if the last lines of the following are true or false? 1) int arrA[3] = {1,2,3}; int *ptrToarrA = arrA; int *anotherptrToarrA = arrA[0]; 2) int arrB[2] = {1,2}; int *ptrToarrB = arrB; int *anotherptrToarrB = *ptrToarrB; | |
I am begininner in DLL. I looked at following site to create dll in C. [url]http://msdn.microsoft.com/en-us/library/ms235636(VS.80).aspx[/url] Can anyone explain how to use the Mathfuncdll.dll in VB.net. Here is my VB code Public Class Form1 Public Declare Function MathFuncs Lib "MathFuncsDll.dll" () Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As … | |
Hi, I need to know how to continue execution of code after throwing an exception. Has it got to do with where I place the throw statement? Thanks in advance. | |
Hi I have a bool function that should find whether a year was a leap year or not. But the function is not returning the correct years as a leap year. [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; bool is_leapyear(int year); int main () { int a = … | |
Hi I faced a very serios problem when I connect c++ with orcale. This is our project. I use c++ at front end and orcale at the backend. If someone know how to create a connection between them Please tell me. Advance Thanks. | |
I have an assignment like that and I dont know how to begin... Could you pls help me. [url]http://www.cse.ohio-state.edu/sce/now/221/labs/writeups/lab07.html[/url] | |
[CODE]#include<iostream.h> #include<string.h> #include<conio.h> const int len=30; enum contract{permanent,temporary}; class Employee{ protected: char name[len]; long int ID; double salary; public: Employee() **} Employee(char n[len],long int id, double s)** strcpy(name,n); ID=id; salary=s;} void setEmp(char [len],long int id,double s) ** cout<<"\nName of Employee: "<<name; cout<<"\nID of Employee: "<<ID; cout<<"\nSalary of Employee: "<<salary; } … | |
I have that funtion for generate sequence to the style 'hqhzaw', 'ebcpm', 'qtch', etc. (only letters) and according to 'lenght' [code=cplusplus] string random_letter(int length) { string s; for (int i = 0; i < length; i++) { s += char(rand() % 26 + 97); } return s; } [/code] I … | |
do you know any win32 smart device project tutorial? | |
Hello once again, I've continued my engine somewhat and the rendering functions are now working fine thanks to Stinomus (feel free to applaud). However to enable it to load data I must use files containing strings describing objects in the game world. That in turn works perfectly and passes the … | |
the exact diff between c++ and java technically........need to submit a assignment | |
Hello, I'm writing a MFC application to move a picture control when i press the "Next" button. (Please see attached screen-captures) There is a dialog box on which there are 2 picture controls. When I press the Next button, the left picture control should move on top of the right … | |
Hello, I require a help on a basic issue. I have 2 classes and I want to have an interaction among the classes. Suppose my 2 classes are testA and testB. Now I want a handle of object pointer in each class to the other class. Like I want a … | |
Hi to all I have ADT of the AVL TREE and I need to add some the function to create tree to family. I have logic error in my code.. my code work to find relationship between two nodes (e.g: a parent of b,a and b are Sibling and so … | |
I hate to be spamming the forums with this, but I've been banging my head at the wall for a few hours now, and I can't really understand what is going on. Here's the full program I'm running: [code=c++] #include <iostream> #include "math.h" int main() { std::cout << sin (3.141592653589793) … | |
Alright, so I am very new to c++ and I just felt like doing a little encryption experiment. In about ten seconds of thinking I've decided that for my encryption I want to: Get the ASCII value of a string of text entered by the user, and store it in … | |
Hey guys, I am having issues understanding how exactly to mod something to avoid overflow. say i have this hash function: [CODE=c++] int universalHash(const string &x,int B) { long long sum; long long power; sum=0; pow = 1; for (int i=0;i<(signed)x.length();i++) { // cout << "sum= " << sum << … | |
Hi, I am also facing problems in converting a file.txt to a file.bin. Cheers, Dagiwal | |
hi , can anyone tell how to define AND operator by regular expression. Actually I want to return match if and only if 2 substrings will appear in string. For example i have string "[B]Successful Logon: User Name: Administrator Domain: Logon ID: (0x0,0x154CB759) Logon Type:2 Logon Process: Advapi Authentication Package: … | |
i am new to c++ programing.can anyone tell me how to draw a line from a point to another point. if the coordinates of the points are given.in (x,y) please also tell me the header files which should be included in program. your comments will be highly appreciated. |
The End.