49,757 Topics

Member Avatar for
Member Avatar for Daria Shmaria

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.

Member Avatar for ArkM
0
454
Member Avatar for abhishek2301

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 …

Member Avatar for ArkM
0
135
Member Avatar for Ameerah

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 …

Member Avatar for ArkM
0
196
Member Avatar for gretty

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 …

Member Avatar for ArkM
0
125
Member Avatar for Carrots

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; …

Member Avatar for Carrots
0
187
Member Avatar for rtwister

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 …

Member Avatar for mvmalderen
0
133
Member Avatar for Behi Jon

Hi . What is the problem of this : template < typename B > ostream &operator << ( ostream &out, const Array < B > &a ) The compiler say "Link error" and ...

Member Avatar for Ancient Dragon
0
184
Member Avatar for Abderian

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 …

Member Avatar for Abderian
0
197
Member Avatar for Daria Shmaria

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 …

Member Avatar for Daria Shmaria
0
149
Member Avatar for wnrqkflwnrqkfl

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: …

Member Avatar for daviddoria
0
78
Member Avatar for thumizee

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;

Member Avatar for mvmalderen
0
87
Member Avatar for aditya_amb

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 …

Member Avatar for Teme64
0
315
Member Avatar for thornside

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.

Member Avatar for thornside
0
10K
Member Avatar for gretty

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 = …

Member Avatar for gretty
0
113
Member Avatar for mirfan00

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.

Member Avatar for mirfan00
0
192
Member Avatar for ultrAslan

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]

Member Avatar for Ancient Dragon
0
69
Member Avatar for effective

[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; } …

Member Avatar for effective
0
67
Member Avatar for rafaelbrizu

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 …

Member Avatar for rafaelbrizu
0
102
Member Avatar for serkan sendur
Member Avatar for DarthPJB

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 …

Member Avatar for DarthPJB
0
232
Member Avatar for lyardson

the exact diff between c++ and java technically........need to submit a assignment

Member Avatar for mirfan00
0
268
Member Avatar for dumbncool

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 …

0
46
Member Avatar for abhishek2301

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 …

Member Avatar for mirfan00
0
138
Member Avatar for mini programmer

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 …

0
89
Member Avatar for Massena

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) …

Member Avatar for ArkM
0
119
Member Avatar for hodge-podge

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 …

Member Avatar for ArkM
0
148
Member Avatar for kylcrow

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 << …

Member Avatar for ArkM
0
164
Member Avatar for dagiwal
Member Avatar for dagiwal
0
33
Member Avatar for ashishchoure

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: …

Member Avatar for ArkM
0
331
Member Avatar for omarzia88

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.

Member Avatar for ddanbe
0
134

The End.