49,757 Topics

Member Avatar for
Member Avatar for Gurjit_1

The code below is giving me the SIGSEGV error, segmentation fault at line number 66(found using debugger).According to me everything is fine but still don't know what is done wrong by me. Please someone help me out to sort the problem #include <iostream> #include <string> #include <fstream> #include <cstdlib> #include …

Member Avatar for Gurjit_1
0
2K
Member Avatar for NOSH1

Write a complete C++ program that ask the user to input two integers, then print if they are divisible by each other or not ( the division has no carry). If they are divisible print their division results on each other. Make sure avoid the divide by zero situation before …

Member Avatar for deceptikon
-1
99
Member Avatar for Simon180

Am trying to compile the following code in solaris 7 using sun workshop 5 below but I keep getting the following errors and have no idea how to fix it. ./timer.h, line 67: identifier redeclared: timer_create current : function() retruning pointer to void previous: function(int, pointer to struct sigevent {int …

Member Avatar for Banfa
0
203
Member Avatar for cannon_1

Unlike linear programming, which has rather friendly software like gurobi or c++ that seamlessly incorporate into c++ system. For the problem class of Max-Sat, I have been searching for such a software without success. Does anyone know of some such software? Thank you:)

0
88
Member Avatar for Prince.Sahil039

You are required to write a program that finds the number (in the given range) which has maximum number of divisors. The program first asks the user to input two values P and Q for a range (where p < Q). After that, the program should find a number having …

Member Avatar for NathanOliver
-3
120
Member Avatar for lewashby

I'm a little confused about inlining member functions. Does all code actually have to be on one line or does it simply mean writing the whole function inside the class rather than from outside using the :: syntax?

Member Avatar for deceptikon
0
127
Member Avatar for Abdu Rahman

hello I had a question that what is the meaning of function in C++. thank you

Member Avatar for AndrisP
0
101
Member Avatar for CPTSNGR

https://www.daniweb.com/software-development/cpp/threads/314577/simpletron-in-c Can anyone else revise this code? I changed the revised version but i still cant get it to work all the way... Your help would be much appreciated :) thank you!

Member Avatar for NathanOliver
0
69
Member Avatar for Simon180

Am trying to build xinetd on my solaris system am using sun workshop c++/c to compile the code but I keep getting the following errors error: `sys_nerr` underclared (first use in this function) error: (each undeclared identifier is reported only once error: for each function is appears in.) error: `sys_errlist …

Member Avatar for NathanOliver
0
1K
Member Avatar for gadgets1010

Hi. I'm trying to implement uniform interfaces for two breakout boards (adafruit's fona and sparkfun's Si4703 breakout) and I'm not sure how to go about writing wrapper classes. Can someone guide me through the basics of accomplishing this task?

Member Avatar for Banfa
0
161
Member Avatar for Sean_8

Problem1: Write the definition for a class named Vector2D that stores information about a two-dimensional vector. The class should have methods to get and set the x component and the y component, where x and y are integers. Next, overload the * operator so that it returns the dot product …

Member Avatar for Banfa
0
2K
Member Avatar for crodriguez08

Hey there, I'm having trouble getting my program to read every instruction to then execute it, as well as displaying everything correctly. Right now my program displays mainly garbage and for now I simply want it to be able to successfully run a simple addition program, so any advice or …

Member Avatar for CPTSNGR
1
2K
Member Avatar for budax.bageur2

how to make the simple malware using iteration on dev c++ ?? that using simple algorithm for do, or while do or do while

Member Avatar for NathanOliver
0
213
Member Avatar for andruluchko

this is my program for list implementation in C++. And I want to print the first element in it. I write element until I reach 0 Can You show me the way to do it. Thanks #include "stdafx.h" #include "iostream" using namespace std; struct Node { int data; Node *next; …

Member Avatar for Banfa
0
2K
Member Avatar for Yudz_1

Write a program that does reservations for a theatre with 5 rows of seats, and 9 seats per row. The rows are numbered from ‘A’ to ‘E’ (back to front) and the seats from 1 to 9 in each row. The user should be presented with a seat plan (showing …

Member Avatar for L7Sqr
1
626
Member Avatar for Freddy Kreuger

So I have a couple of problems with this assignment and I need a bit of help. The first is Went ever I input the name of a college or university that I know is on the list, it causes an infinite loop and repeats the menu forever. This will …

Member Avatar for NathanOliver
0
268
Member Avatar for Daniel_30

I am a student in Computer Science, and am writing a small guide for my fellow students. It will contain a large list of the most commonly used and studied functions in C++ (e.g. Bubble Sort, linear search, file writing, etc.) and the code used to perform each function. I …

Member Avatar for oboumat
0
130
Member Avatar for Glaven

I need to find the smallest number in my 10x8 array grid fileld with random numbers I know im doing it wrong but I do not know what to do. Please Help! Heres my Code: //ArrayGrid #include <iostream> using namespace std; int main() { int total,average,smallest; int row=0; int col=0; …

Member Avatar for Glaven
0
615
Member Avatar for Zyxl

I'm about to begin developing an application that requires some basic 3D rendering, so I'm looking into C++, as this seems to be the usual language for this type of thing and I have a book to help me with this project that includes some snippets of C++ code (not …

Member Avatar for Zyxl
0
744
Member Avatar for rayhaneh

this is my program and every time shows me this error:18 26 :: [Error] statement cannot resolve address of overloaded function:: #include <iostream> using namespace std; int pow(int a,int b); int mabna(int n, int k){ int a,b,s=0 ; for(int i=0;i!=0;i++){ s=(a%b)*pow(10,b); s+=(a/b)*b; return s;} } int main (){ int a1,a2, …

Member Avatar for Moschops
0
127
Member Avatar for Pyler

Suppose I have the following class in a header file //tray.h #include <vector> #include "Eggs.h" #ifndef TRAY_H #define TRAY_H class Tray{ std::vector<Eggs> dozen; public: Tray(); ~Tray(); std::vector<Eggs> getTray() const; }; #endif And the following class file //tray.cpp #include "Tray.h" #include <string> Tray::Tray(){ } Tray::~Tray(){ } How do I initialize the …

Member Avatar for rubberman
0
255
Member Avatar for shahera.arafat

#include<cstdio> #include<string> #include "inventory.h" #include "node.h" #include<iostream> using namespace std ; int main (){ inventory*obj1=new inventory(); int size; int id,i; char A[100]; char S_string; cout<<"plz enter the size of the list "<<endl; cin>>size; for(i=0;i<100;i++){ cin>>S_string; A[i]=S_string; } int a=strcmp(A[i],"new"); if(a==0){ for(int j=0;j<size;j++){ cout<<"enter the id"<<endl; cin>>id; obj1->new_id(id); } } getchar(); …

Member Avatar for sepp2k
0
117
Member Avatar for Mr.UNOwen

Hello, So I'm having trouble figuring out what the correct syntax is for a function with a return type that is a template type and is within a namespace. Anyone see anything wrong with the code below? -------.HPP file: #pragma once #ifndef EC_UTIL_H #define EC_UTIL_H #include "../CommonHeaders.hpp" #include "../core/common/APVertex.hpp" #include …

Member Avatar for sepp2k
0
346
Member Avatar for Justin_12

Can somebody help me to do a program that will simplify an expression using Boolean Laws

0
57
Member Avatar for osama.11
Member Avatar for osama.11
0
79
Member Avatar for Tycellent

std::endl vs \n Are any particular one which should be used at specific times? I understand endl flushes the stream (although i'm not 100% what this means) while \n is simply a newline.

Member Avatar for rubberman
0
400
Member Avatar for shahera.arafat

hii everyone :)) I want to write a prog. that the user can enter e.g (new 1112236) in the black screen ,, then the prog. should go to the (new)func. and create a new node with that ID ..soo how can I split the strings ?and how can I define …

Member Avatar for tinstaafl
0
139
Member Avatar for Builder_1

#include<iostream> #include<conio.h> #include<string> using namespace std; struct node{ char data; node * next; }; void queue1(); void queue2(); void queue3(); void queue4(); void concatenate(); node * firstnodeptr1=NULL; node * lastnodeptr=NULL; node * firstnodeptr2=NULL; node * firstnodeptr3=NULL; node * firstnodeptr4=NULL; node *finalfirstnodeptr=NULL; int counter1=1,counter2=1,counter3=1,counter4=1; void main(){ char ch; do{ cout<<"enter the …

Member Avatar for NathanOliver
1
496
Member Avatar for Malkolm

I want to count how many times a quoted string appears in a string. `Today "is" a new day "because" it is "12" am.` A string like this should evaluate to 3. I don't know why my code prints 0. #include<iostream> #include<string> using namespace std; bool isQstr(string str); int main() …

Member Avatar for L7Sqr
0
288
Member Avatar for aluhnev

//Hi,i need to create programm,which takes the user input,determins how many digits in integer // and than raise this digit to power,what was entered by user too. //first function noraml,second one to rais to power recursive. So if user enter number //234,this is 3 digits,so now need recurcively 3 raise …

Member Avatar for Banfa
0
271

The End.