49,761 Topics

Member Avatar for
Member Avatar for Violet_82

Hi guys, I am having problems with a simple program I wrote, here's the source code: [CODE]//seventh #include <iostream> using std::cout; using std::cin; using std::endl; class Maths { public: void enterInstructions( int instructions ) { cout <<"I want to do a: \nAddition\nSubtraction\nType your choice here: "<< instructions << endl; } …

Member Avatar for jonsca
0
155
Member Avatar for safia qurban

i want to give a presention on functions use in code and want to give a comparision by function call by value and by reference with different cods can any one help me ,as give me these codes?

Member Avatar for Ancient Dragon
0
244
Member Avatar for johnnybgoode
Member Avatar for vegaseat
0
761
Member Avatar for parisa_bala

I am a C programmer. I am working on a C++ code and translating it into C. I got stuck in a point where I do not understand what is going on. I would kindly ask if you would mine help me to understand these problems. I have three problems: …

Member Avatar for Narue
0
199
Member Avatar for MrPapas1991
Member Avatar for eddan

Hello!! I have started learning c++ and it has been a real sucess until now. My codes that worked before and those that im trying to use now, doesn't work.. I get a compiler error... Here is the code and the error: // tutorialearning.cpp : Defines the entry point for …

Member Avatar for gangsta1903
0
896
Member Avatar for lamphan

I have debugged and dec2bin function outputs "bin" value is right, but cout function somehow prints out wrong value. How to fix it? Thanks! [CODE] #include <iostream> #define bit 5 void dec2bin (int, int *); int main (void) { int bin[bit]; int num = 24; // example dec2bin(num, bin); for …

Member Avatar for Nick Evan
0
151
Member Avatar for bhp2005

Hi, I have this homework problem that I need some help on: In 3D: Given 2 links attached end to end with lengths L0 and L1 respectively, a point P0 that the first link starts at, and a point P1 that you want the end of the 2nd link to …

Member Avatar for jonsca
0
159
Member Avatar for Stefano Mtangoo

Hi guys, I have two bushes to clear up. I have doe SQL fro some time now but I have never done blob. I think the next project will require it. So here are my Question: 1. How blob differ from any other type like text? 2. How to create …

Member Avatar for Stefano Mtangoo
0
120
Member Avatar for MyRedz

help i need to search and delete a node from a link list but i am not sure of the algorithm can someone please help me with the algorithm and concept need example thanks..

Member Avatar for lotrsimp12345
0
109
Member Avatar for C++new

This code is a tutorial, from internet, I can make it to compile, error to advance for me, (+) use is a ???? for me, using MV C++. Is a class tutorial..... [code] #include<iostream> #include<iomanip> #include<string> using namespace std; class Food { private: //instance variable.Every object wiil have this variables..... …

Member Avatar for lotrsimp12345
0
150
Member Avatar for pato wlmc

Well, i'm developing a program, ( API ) and i'd like to use a [url=http://www.snap2objects.com/wp-content/uploads/2009/10/6.jpg]non standar font,[/url] for some section of my program. My question is, how can i do this, i mean, i supose i have to install the font on the user pc, but how do i do …

Member Avatar for pato wlmc
0
202
Member Avatar for ybkumar77

Hi, I am writing a simple program, trying to learn the usage of map. Following is the data, I will be storing in a map and I get a core dump when line No: 54 is being executed. Please let me know if something is wrong in my code. I …

Member Avatar for ybkumar77
0
1K
Member Avatar for roc a

I am having a hard time getting started on this array. I am in a C++ class but I have no refrence material to go off of This is what i have so far, The purpose of the code is to find out how many wait staff is needed if …

Member Avatar for Stefano Mtangoo
0
192
Member Avatar for wolfkrug

I am converting a console IO program to a file IO program. The program worked perfectly as a console IO. I thought I made the appropriate changes to the program. It compiles, and when I run it output does go to my output text file, but the output is the …

Member Avatar for WaltP
0
180
Member Avatar for squarey

Hi guys I use the following code to check if a user has specified a certain argument: [CODE]if (strcmp(argv[i], "-i") == 0) { // do something }[/CODE] I use the following code to check whether any arguments have been specified (e.g. -i test1) but it gives me a segemtation fault …

Member Avatar for strmstn
0
67
Member Avatar for mani_singh

i am trying to make a program where a user inputs two numbers. the first number needs to be less then the second. then the program needs to add all the numbers together that fall between those two numbers including the two numbers. for example number1 = 1, number 2= …

Member Avatar for WaltP
0
252
Member Avatar for Phloxicon

I need to find how long it takes to execute a bunch of code. I've tried using clock() but it's just not accurate enough for the small functions (it says 0 cycles have passed). I heard of gprof but that only seems to be for Linux. The version of Visual …

Member Avatar for Phloxicon
0
79
Member Avatar for xschecterx

Hello, I'm trying to print out on the screen the the sum of a perfect number, and i can't quite figure it out how to code it. For example I now 6 is a perfect number so i need [ 6= 1+2+3 ] to print out on the screen. Any …

Member Avatar for clutchkiller
0
100
Member Avatar for jBat

Hi, I'm trying to convert a void pointer to a struct pointer.. that's seems very easy but my compiler give me error. Thanks. /home/subi/Personal/Projects/LinkedListUserInfo/main.cpp||In function ‘error_t parse_opt(int, char*, argp_state*)’:| /home/subi/Personal/Projects/LinkedListUserInfo/main.cpp|50|error: expected primary-expression before ‘)’ token| /home/subi/Personal/Projects/LinkedListUserInfo/main.cpp|50|error: expected ‘;’ before ‘null_pointer’| /home/subi/Personal/Projects/LinkedListUserInfo/main.cpp|48|warning: unused variable ‘null_pointer’| ||=== Build finished: 2 errors, 1 …

Member Avatar for jBat
0
132
Member Avatar for nats01282

I am after making my program wait before responding to the users input, what code do i use for this and how do i implement it? [CODE]#include <iostream> using namespace std; int main() { char instuctions = 0; int A = 0; // user input 1 int B = 0; …

Member Avatar for Stefano Mtangoo
0
165
Member Avatar for fmma

Problem: Use a 2 dimensional static array with 3 rows & 2 columns to the course number and number grade you have received in that course. The program should have three functions called get information, printinformation, and convert. You need to send array to getinformation and printinformation functions as parameters. …

Member Avatar for Lerner
0
149
Member Avatar for Kikazaru

Is there any advantage in declaring a variable local to a function const? i.e., I want to use a sine value a couple of times so I store it in a local variable. If I make it const does this facilitate any compiler optimizations... or anything beneficial? [CODE] double my_func(double …

Member Avatar for vijayan121
0
3K
Member Avatar for kedarm

Hi! I am trying to convert my c/c++ code into a python module. The code captures an image which it then runs some algorithms upon. For a start, I am trying to write a code that just captures an image. I am using opencv for the image capture (in the …

0
102
Member Avatar for Nicholas_Roge

As the title states, I'm trying to learn how to create a custom GUI window for Windows. Basically I'm asking how I can output pixels to the screen without using any of the default windows gui classes.

Member Avatar for Stefano Mtangoo
0
110
Member Avatar for tkud

Hey everyone, I want to start learning socket programming. Ay references and advices will be greatly appreciated!!

Member Avatar for Stefano Mtangoo
0
144
Member Avatar for SimonLarsen

I'm working on my first game in C++ and SDL. The game compiles and runs perfectly on both my boxes (Arch Linux and Windows XP). When two of my friends were to test the game, one of them (running Windows Vista) said his machine BSoD'd every time he ran the …

Member Avatar for SimonLarsen
0
232
Member Avatar for Enigmatic331

Dear all, I am currently working on a mini-application using Visual C++, and it goes pretty much like this: The program, using mousehook, will retrieve the coordinates of the current mouse position using getcursorpos when a right click is executed, and it will return with a red dot on the …

Member Avatar for Enigmatic331
0
165
Member Avatar for deja-vu

I got a problem solving this. I tried to use the sample input and I got exactly the same output as the sample output but I still got WA. Even my output had the same format and same number of characters including every new line but still got "wrong answer". …

0
57
Member Avatar for DrewDodson89

My program is able to create the folder fine but I wanted to know if there is a way to put the date and time in the title? C++ and using Visual Studio 2008 for Windows. [CODE]system("mkdir %SYSTEMDRIVE%\\Blebble\\Blabble");[/CODE]

Member Avatar for DrewDodson89
0
224

The End.