49,757 Topics

Member Avatar for
Member Avatar for format_c

can any one identify any problems in my code? it keeps crashing once it reaches the else condition. [CODE]void path(char paths[][70], int sROW, int sCOL, int fROW , int fCOL) //recursive path function { if (paths[sROW][sCOL]=='E') { for(int i=0; i<20; i++) { cout<<endl; for(int j=0;j<70; j++) { cout<<paths[i][j]; // display …

Member Avatar for VernonDozier
0
98
Member Avatar for ace8957

Hi all, So I have reached a kind of impasse on my current project. I'm trying to make a program that can function like a phone book, loading information from a file into a binary search tree and performing operations on said information. The issue I'm having appears to be …

Member Avatar for ace8957
1
7K
Member Avatar for Hayzam_#include

Hi i wanted to make a software that can "Off" and "On" a computer fan connected with a usb can i make it in c++?? i have 1 year experience doing C++ Thanks,

Member Avatar for Hayzam_#include
0
139
Member Avatar for muze

hello guys...i am trying to compile this project but getting this error. I have specified all the neccessary libraries and include files but I dont know why it is looking in wrong direction and showing me these errors It says [B]LINK : fatal error LNK1104: cannot open file '..\..\..\wrong path\src\debug\file_name.lib[/B] …

Member Avatar for Ancient Dragon
0
77
Member Avatar for salamjamal10

Hello all, Please help me if you can: my question is [B]what is the efficiency of the queue's insertion and deletion operations when the ADT list's implemetnation is a. Array-based b. Pointer-based[/B] Give me a hint if you can. I am new to the C++ world so please forgive me …

Member Avatar for VernonDozier
0
202
Member Avatar for jasleen12345

[CODE] #include<iostream> #include<cstring> using namespace std; class city { protected: char *name; int len; public: void getname(void) { char *s; s= new char[30]; cout<<"Enter city name: "; cin>>s; len= strlen(s); name= new char[len+1]; strcpy(name,s); } void printname() { cout<<name<<"\n"; } }; int main() { city *cptr[10]; int n=1; int option; …

Member Avatar for MattyRobot
0
105
Member Avatar for minskypooh

The problem is to create a console-based program that prompts the user for name, student number, course, and grade (50-100 whole number only). After the input, a message should be displayed depending on the grade. The program should display an error message and terminate immediately if there is an invalid …

Member Avatar for minskypooh
0
196
Member Avatar for rozario2010

hello -i'm a student and i have been given the task to develop a P2P Voip application. - the program should work on Local network and adhoc network (and internet if possible) without server. -The program should have an address book to add unlimited user name with the ip and …

Member Avatar for jonsca
-1
533
Member Avatar for vskumar19

Hi all, I have a structure for which array of objects are created Now i want to return that array of objects to a function just like below: struct mystruct s[5]; . . code . return s; in the function i captured using *s void myfun(mystruct *s) but i am …

Member Avatar for Isaac Remuant
0
106
Member Avatar for mca.narender

Hi, I am working on a VC++ (Visual Studio 2008) Module and i am new on this module. This module is working on 32bit fine, i need to convert this in 64 bit. I installed x64 bit compiler and select 64 bit in Project Properties. I got following error while …

Member Avatar for Ancient Dragon
0
145
Member Avatar for dhawalruud

[code] #include<iostream.h> #include<conio.h> #include<iomanip.h> #include<stdio.h> #include<stdlib.h> #include<fstream.h> #include<string.h> int n=0; // current no. of players ( to add to next one) int num=0; // total number of players class date { public: int dd; int mm; int yy; }; class players { public: char name[30]; date dob; char userid[30]; char …

Member Avatar for jonsca
0
684
Member Avatar for Hayzam_#include

Hi i am new to qt but i have programing experience in c++ in dev - c++ after i moved to qt i thought i could start like this if i press a button it should output hello world it is just showing me 1 error system was not declared …

Member Avatar for Hayzam_#include
0
98
Member Avatar for georgy9002

Hi all; I need help with a program, where its a game where users are to guess a randomly selected number. The user has a max of 1 - 100. [code] class CScoreboard { private: string players_name; int round; int guess_avg; int total_score; public: CScoreboard() { players_name =""; round = …

Member Avatar for gio.perez13
0
151
Member Avatar for rocktea

i have problem .this is have functional if- else, but in functional has functional recursion .is functional has recursion?

Member Avatar for Nick Evan
0
66
Member Avatar for lochnessmonster

for some reason the createremotethread() function is failing when i try it on calc.exe, or notepad.exe....when i use getLastError() it returns an error code of 5 : ACCESS_DENIED anyone have any ideas how/what i am doing wrong? and yes i am using OpenProcess(CREATE_THREAD_ACCESS, FALSE, ProcessID); -thx

Member Avatar for mitrmkar
0
117
Member Avatar for blackxswil

Can someone point me where did i do wrong on the coding below? [CODE] class Course { private: string nameCourse; <-- is this correct? int totalOfCourses; public: void registerCourses(string course[], int numberOfCourses) { totalOfCourses = numberOfCourses; for(int i=0; i<totalOfCourses; i++) { nameCourse = course[i]; } } void displayCourses() { cout …

Member Avatar for jonsca
0
121
Member Avatar for Abayiz

Hello! I am trying to read some data from an existing .txt file, actually that data consists of three columns, and dozens of raws. I can read it and write it to another new .txt file, but the problem is, it generates only one column with all those data, which …

Member Avatar for Abayiz
0
169
Member Avatar for mhaviv

Hi all, I have written a simple function to compute factorial in C++. It computes OK until 31! which is 738197504. Now for factorial 32 it gives me a negative result and for 34 it gives me 0. I know that on my machine LONG_MAX is 2147483647. So in my …

Member Avatar for NathanOliver
0
91
Member Avatar for vbx_wx

I`m getting the following error in my code(line 65): [code] error: expected constructor, destructor, or type conversion before ‘*’ token [/code] [code] namespace SocketSpace { class Error { public: Error(const std::string& msg = 0) throw(); const char* what() throw(); ~Error() throw(); private: std::string message_m; }; class Socket { public: void …

Member Avatar for vbx_wx
0
142
Member Avatar for gpjacks

So, I am in the mid part of my C++ class and am having trouble with a vector project at the end of the chapter. I don't expect the answer, but if someone would point me in the right direction I would greatly appreciate it :) #1). Write a loop …

Member Avatar for gpjacks
0
262
Member Avatar for vanalex

Hello everybody! I want to ask something that crossed my mind today about strcpy..I wrote the following piece of code and although i didn't expect it to work..it worked! [CODE] #include <iostream> using namespace std; int main() { char name[20], *dname; cout << "what's your name?: "; cin.getline(name, 20); strcpy(dname, …

Member Avatar for WaltP
0
64
Member Avatar for tech9x

i want to find the number in a string and then store it into int, i tried sub string, but the compiler tells me that i cannot convert string to integer. what can i do??

Member Avatar for WaltP
0
73
Member Avatar for liveurlifeteddy

Hello everyone, i got a question, but cant figure it out here's the question: Declare a structure to hold the time. It should have 2 members: one for hours and one for minutes (each as integers). Declare another structure for date. It should have 3 members: one for day, one …

Member Avatar for liveurlifeteddy
0
109
Member Avatar for hiddepolen

Hi Daniweb! I couldnt find my problem anywhere else on this forum, so I decided to make my own thread... My problem: I'm trying to make a function to decide how many decimals a 'double' has. My code (slightly edited, here's the base of it): [CODE] // int m = …

Member Avatar for MattyRobot
0
183
Member Avatar for ayesha91

HEllo this is reaaally urgent, the deadline is within less than an hour and thirty minute, and I lost hope that I can fix the problem myself. I know it has to do with pointers and allocating memory dynamically. The assignment was to use operator overloading to add two sets …

Member Avatar for dwks
0
167
Member Avatar for lochnessmonster

comment should explain what im trying to accomplish...not sure how i should approach this problem tho [CODE] fileWork::fileWork(const std::wstring& processName,const std::wstring& fileName) // i want to use initializer list, but how can i do so if i want the function arguments to be checked first...before any class members are initialized? …

Member Avatar for dwks
0
89
Member Avatar for claudiordgz

Hi guys, I am trying to load a Haptik.hpp to control a Novint Falcon. I receive error C2144 syntax error and C4430 in the next line [CODE] //---FUNCTION // Desc: C-based entrypoint to retrieve IHaptikLibrary interfaces //-------------------------------------------------------------------------------------------------------------> extern "C" HAPTIK_DLL_IMPORT_EXPORT PVOID GetHaptikLibraryInterface(IN UINT32 interfaceId = HAPTIK_IHAPTIKLIBRARY); [/CODE] So I pasted …

Member Avatar for Ancient Dragon
0
549
Member Avatar for muze

hello guys...im getting this error. Looked for this but could not find some solution [CODE] error C3861: "xxxxx" identifier not found [/CODE] How can I fix this error? thnx

Member Avatar for jonsca
0
182
Member Avatar for precila

The C++ I/O system supplies an interface to the programmer that is independent of the actual device being accessed. This interface is known as stream. The I/O system contains a hierarchy of the stream classes used to define various streams to deal with the console and disk files. These classes …

Member Avatar for precila
0
200
Member Avatar for Violet_82

Hi there, if I call a double function like [CODE]double MyPrice( ) { return cost; }[/CODE] (value "cost" assumed to be set to 7.00 why this function returns 7 and not 7.00? thank you

Member Avatar for Violet_82
0
182

The End.