49,766 Topics

Member Avatar for
Member Avatar for stacey.rae.35

I need help running my program this is what it asks me for "Write a program that asks the user for the name of a text file. The program should display the first 10 lines of the file on the screen. If the file has fewer than 10 lines, the …

Member Avatar for nmakes
0
229
Member Avatar for LostStranger

A newb programmer here I have a project involving pedestrian simulation I'm planning to use libpedsim.dll in python with Ctypes but so far I cannot make the functions working Can anyone point out how to make use of this DLL? This is the class documentation: http://pedsim.silmaril.org/documentation/libpedsim/latest/classPed_1_1Tscene.html This is the link …

Member Avatar for vegaseat
0
467
Member Avatar for tumblinmonkeym

I am trying to implement a priority queue with an unsorted array and hit a wall when I received a Segmentation fault:11. I used gdb and got the error: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x00000001000017fa in Item<std::string>::setKey (this=0x0, k=3) at PriorityQueueArray.h:27 27 …

Member Avatar for deceptikon
0
870
Member Avatar for AmerJamil

When im using fstream.h its giving an error with using namespace std, how ever when i use simple fstream without .h , it is not giving error but not reading the file, How can i use fstream object using fstream.h header file along with using namespace std? Your urgent response …

Member Avatar for deceptikon
0
978
Member Avatar for Melly3

Hi, I'm working on classes with pointers. I do have a main function that calls this. This program compiles. But the input from the user isn't getting passed to the other functions. The user_input function should take the response and pass it to the create_posting then it is outputted to …

Member Avatar for RonalBertogi
1
225
Member Avatar for tomz6
Member Avatar for Banfa
0
996
Member Avatar for owenransen

I want to port some graphics applications in C++ which compile to Windows Executables to run as WEB apps. I don't want to throw away all the code I've written in C++, so it seems to me that Microsoft Azure would be prefect. My idea is that I learn to …

Member Avatar for LastMitch
0
162
Member Avatar for James19142

I'm writing classes for widgets on a ui. While planning what I would do, I realized majority of the of the classes would look very similar. What I decided to do was to use a macro that takes a few parameters to define the similar parts of the class bodies. …

Member Avatar for James19142
0
815
Member Avatar for Akshay nand

Lab Assignment 1 - A Simple UNIX Shell Objectives: The objective of this assignment is to understand the workings of a command-line interface (CLI) and to obtain a working knowledge of process forking and signalling. Assignment: In this assignment we will build a command shell in stages. Our command shell …

Member Avatar for deltascrow
0
294
Member Avatar for huang0521

Hey guys I have some problem in my c++ program hope you guys can give a hand -------------------------------------------------------------------------------------------------------- do printf("Please key in the number of passenger >>"); scanf("%s" , &no_passenger_check); if (strlen(no_passenger_check)>3) { repeat = 1; }else { if (isdigit(no_passenger_check[0,1,2])) { repeat = 0; } else { repeat = 1; …

Member Avatar for deceptikon
0
213
Member Avatar for ahsan38

hey guyz i was trying to make a program for insertion sort but its not working please someone help... #include<iostream> #include<conio.h> using namespace std; main() { int i,m,num[5]; cout<<"Enter Integer Values"; for(int a=1;a<=5;a++) cin>>num[a]; for(int j=2;j<=5;j++) { i=1; while(num[i]>num[j]) i=i+1; m=num[j]; for(int k=0;k<=j-i-1;k++) { num[j-k]=num[j-k-1]; } num[i]=m; cout<<num[i]<<num[j]; } getch(); …

Member Avatar for deceptikon
0
165
Member Avatar for waqas.zafar.125

hey guys ! i have a problem relating to linked lists .. Make a class called Card. Each card is represented by a suit and a rank. You can keep both as strings. Implement getters and setters for the Card class as well as a print function. A 7 of …

Member Avatar for tinstaafl
0
198
Member Avatar for triumphost

I'm trying to write a cout formatter that uses the comma operator and insertion operator. I wasn't able to get that to work so I decided to write it similar to std::boolalpha. when you use `std::boolalpha`, it is able to change 0 values to true and false and you can …

0
189
Member Avatar for coolbeanbob

I am trying to get the program below to work. I keep getting the error below, and I can't figure out why??? Derived.obj : error LNK2001: unresolved external symbol "public: virtual class Other * __thiscall Derived::add(int,int)" (?add@Derived@@UAEPAVOther@@HH@Z) #ifndef _BASE_H_ #define _BASE_H_ #include "Other.h" class Base{ public: virtual Other *add(int x, …

Member Avatar for Moschops
0
241
Member Avatar for CHOCHOCHO

This program reads in some numbers then outputs the numbers, low to high, by using a bubble sory. I need some help to start how to do the bubble sort on a linked list. Here is what i have so far. .h file #include<iostream> #include<fstream> #include<cstdlib> using namespace std; struct …

Member Avatar for Schol-R-LEA
1
1K
Member Avatar for kux

ok, I've checked the forum and I don't think this topic was touched. What I would need is an open-source or at least free static analysis tool for C++ code. Does anybody have any suggestions? I mean, searching the web C++ lacks A LOT at this chapter, compared to Java, …

Member Avatar for IssamLahlali
0
255
Member Avatar for tehsmartniss

I would be very interested to read some educated speculation concerning why there is no c++ standard way to handle unbuffered input, e.g. something like getch + kbhit. For literally decades, innumerable c++ console programmers have sought a way to simply implement, "Press any key to continue..." The fact that …

Member Avatar for Schol-R-LEA
1
1K
Member Avatar for liphoso

Hope this is the correct place to put this question. i am new to linux and am runnning ubuntu 12.04. I just installed Netbeans 7.0.1 and xampp 1.8.1, both running on ubuntu. i would like to make a c++ program that uses the MySql database that comes with xampp. I …

Member Avatar for pritaeas
0
94
Member Avatar for tayyabatiq

Hi I'm coding in C++ XAML to make a windows 8 store app. Now, there are two objects in my main window: a textBox and a textBlock. What i want to do is that the user will write an equation in the textBox and the textBlock will show all the …

0
152
Member Avatar for gelmi

here's my problem, i wanted to connect void 1(); to void 2() because void 1() this is where i put the code for the employee's id and name void 2() this is where all the computation goes on.. hmm..there is gonna be a time in and time out which are …

Member Avatar for tinstaafl
0
115
Member Avatar for vindy1099

I've been working on functions which can perform arithmetic on arbitrarily large unsigned integers for sometime now. I've got add, subtract, multiply, and division with remainder all working but the division function is too slow. I would like to implement Newton-Raphson division but am having a hard time finding example …

Member Avatar for rubberman
0
305
Member Avatar for silvercats
Member Avatar for nmakes

I had a doubt in one of the usages of typedef. I want to know the meaning of this line: typedef char Text[80]; What is the meaning of this line and what does it do? Does it create an array of typedefs relating to char, or does it mean "Text …

Member Avatar for deceptikon
0
579
Member Avatar for VernonDozier

I have developed a program for a word game that reads from a text file containing a list of all legal English words, then stores those words in an array used by other parts of the program. The program works, but I am not very happy with the word list …

Member Avatar for Saumil11
0
4K
Member Avatar for tomz6

(C++ question) I need to be able make a compiled code (like a .dll?) which other programmers can use on linux, win,, mac, etc. The compiled code would simply do calculations and spit out an answer in memory. I need it to have certain functions that they can easily call …

Member Avatar for rubberman
0
179
Member Avatar for tomz6

Are there any other good/reliable hashs which are smaller than MD5 and faster? (for purposes of checking for file corruption - not for security purposes) (preferably 16bit?)

Member Avatar for rubberman
0
310
Member Avatar for iEpic

I hate being a perfectionist it's driving me crazy. I can get it to resize to the words, but when I replace them with small 3 letter words, the design messes up and everything gets out of place. I'm a beginner and you guys are probably going to laugh at …

Member Avatar for nullptr
0
2K
Member Avatar for kevin.bryant.3701

I am trying to create hashing function the algorithm requires me to take each letter of the string and converting it to ascii, multiply it by a number based on its position in the string (for example Input is STACK; ascii for S would be 344 multiply that value by …

Member Avatar for tinstaafl
0
192
Member Avatar for tomz6

What is the most efficient (fastest) way to load data from a file on HDD to RAM? (which would allow to only load a limited section of that file - eg. load only half of the file etc.)

Member Avatar for mike_2000_17
0
302
Member Avatar for SiDZMsG

Hi I am writing a program using C++ to give a menu of 25 HTML file names. The user will have to select a file name and then the file should be either displayed as text (scrollable by page) or in the default HTML browser. Could someone help me out …

Member Avatar for Moschops
0
111

The End.