49,761 Topics

Member Avatar for
Member Avatar for Dark Byte

I have viewed some source that contained an identifier with a scope operator preceding it. Ex: [code=c++] ::var[/code] What does that mean/do?

Member Avatar for LordNemrod
0
115
Member Avatar for hurbano

i need help making an add function for an array. i know how to initialize it and have it started. when i add content into the array, i need to add it as a linked list. i have my function for the linked list completed alrady. if anyone can help …

0
73
Member Avatar for Stefano Mtangoo

Seeing we can do it with structs, why do we need classes? See the code and quote from [URL="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlcpp8a.doc/language/ref/cplr054.htm"]Link[/URL] [QUOTE="IBM Developer"]The C++ class is an extension of the C language structure. Because the only difference between a structure and a class is that structure members have public access by default …

Member Avatar for LordNemrod
0
100
Member Avatar for vbx_wx

[code] #include <iostream> #include <cstring> void rev(const char* str) { char* p = new char[strlen(str) + 1]; for(int i = 0; str[i] != '\0'; i++) { p[i] = str[strlen(str) - i]; } p[strlen(p) + 1] = '\0'; std::cout << p; } int main() { const char* s = "vBx"; rev(s); …

Member Avatar for LordNemrod
0
267
Member Avatar for therstonsplace

does anyone know how the binary information in a video file works... i found the file signature... but i pulled one character off after the file signature and it did not do what i thought it would... my code works fine... i just dont understand whats in the binary of …

Member Avatar for myk45
0
67
Member Avatar for rowanmck

Hi, I'm a newbie to C++ so please be patient. I have to create program that outputs a simple moire pattern or a graph of y-values from a .csv file depending on which one is called. The code below is what I have before main and is where I am …

Member Avatar for uridvir
0
2K
Member Avatar for tennis

I got run-time error for the following code. I am just starting to get familiar with linked list. Can any one point out what's the problem here? thanks [CODE] #include "stdafx.h" #include<iostream> using namespace std; struct node { int data; node * next; }; node* buildonetwothree() { node* head=NULL; node* …

Member Avatar for gerard4143
0
133
Member Avatar for hurbano

Hi there! I need help with my assignment. The point if it is to make an array table that will hold various linked lists that hold other items. I already have my code to add and retrieve information from a linked list. I need help making an array that will …

Member Avatar for hurbano
0
81
Member Avatar for nirali7

Hi, I am kind of new to C++ and really stuck with a problem. Here I am trying to parse a string and after comparing to a pre-declared array save the tokens in a vector of vectors. It is giving a number of errors and I'm not sure what to …

Member Avatar for nirali7
0
2K
Member Avatar for syd919

hello i am having a little problem, I cant convert a double to one decimal place: here is my code [code=c]for(int i=0; i<marklist.size();i++) { double result=floor((marklist.at(i) /maxmark)); cout<< result<<endl; } [/code] I want result to be one decimal place

Member Avatar for syd919
0
163
Member Avatar for aprilchica3

Hello, I am supposed to write a statement for a Codelab review test that asks: [I]"Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all the non-negative values into total. The loop terminates when a value less than …

Member Avatar for aprilchica3
0
1K
Member Avatar for GBoyle

I am writing a model economy in which corporations (class BCorp) and persons (class BPrsn) act as agents buying and selling goods and services. I have a pool of contacts (class BContact) in which contact information is retained about each contact between agents. In a contact object I store a …

Member Avatar for GBoyle
0
144
Member Avatar for linta

plz help me 2 finish my c++ proj on supermarket.i need the exact details of the funcns,sub calculatns............. urgent

Member Avatar for prvnkmr449
-6
214
Member Avatar for VBNick

I was trying to make a for loop count down backwards using this loop, but when it gets to zero, instead of realizing that decrementing will bring the number below zero, it tries to make the unsigned short (-1), which is actually 65535 as unsigned. of course, this code produces …

Member Avatar for William Hemsworth
0
170
Member Avatar for kuchick32

One of my assignments is to write a factorial function. I have no clue how to start this program. HELP!! This is my assignment.. Example Outputs Enter the number: 5 The factorial of 5 is 120 Enter the number: 0 The factorial of 0 is 1 Enter the number: -8 …

Member Avatar for Narue
0
97
Member Avatar for peter brown

I have a problem, I want to create a program in C++. A simple program displaying all even number between 1 and 100, (such as 2, 4, 6, 8 etc.) in an out put. Can you tell me what wrong. Something like this. #include <iostream.h> int main() { int num1=1; …

Member Avatar for Akill10
1
1K
Member Avatar for Kostan M

Hi all!!! Could any one help me??? I want to build curve with C++ 6.0, but I don't know how to begin. I've been learned more about this case and the general problem is about header file "graphics.h". It is right?? Please help me!!! thanks a lot....

Member Avatar for Ancient Dragon
0
42
Member Avatar for pa_bruce_fan

I have a text file that I am reading into my program. The data looks as follows: Last Name, First Name, Current Salary, Raise Percentage iller Andrew 65789.87 5 Green Sheila 75892.56 6 Sethi Amit 74900.50 6.1 Ge Robert 81990.23 3.3 Smith David 43221.33 5.5 Jones Mary 33345.12 2.3 Goodman …

Member Avatar for daviddoria
0
106
Member Avatar for kuchick32

I'm supposed to write a program in C++ to show someone a grade criteria. I need some major help with it! I'm so so so confused! :( here is my assignment. please help me! A >= 90 B >= 80 C >= 70 D >= 60 F < 60 The …

Member Avatar for Akill10
0
127
Member Avatar for ALI SHER

can we make the maze game using header files of conio.h and iostream.h

Member Avatar for aakash juneja
0
944
Member Avatar for RaoxFaello

Firstly i know your gonna say "OMG this guy just want to make his homework using our help" "Wow, this guy is so stupid not knowing this" Yes, i dont know this.. and yes this is my homework.. i'm not asking a direct answer atleast just teach me while pointing …

Member Avatar for Ancient Dragon
0
96
Member Avatar for eduard77

Here I have another one: The program that should first read in two values from the keyboard, a starting value and an ending value. It should sum all the even numbers between those two values including the endpoints and display the sum. If the ending point is less than the …

Member Avatar for Ancient Dragon
0
82
Member Avatar for BryantFury

a 'challenge' question by my teacher asks me to look in my C++ book, and do a question. it asks me to: write a function powfun() and make it raise an integer number passed to it to a positive integer power and returns the result to the calling function. it …

Member Avatar for BryantFury
0
119
Member Avatar for sadaka

Hello again everyone, How are you all doing? I am an fairly familiar with C/C++. I have five books on my shelf about programming in C/C++ but none could provide me with a satisfactory solution to this one problem. I would like to graduate from the Hello World project in …

Member Avatar for sadaka
0
109
Member Avatar for embooglement

I just finished writing a string class that includes functions for generating random string (why I don't know, as I have never really needed random strings before). Basically the user can pass the function an enum citing what kind of string that'd like (i.e. AllUpperCase or AllNumeric). There is also …

Member Avatar for mrnutty
0
132
Member Avatar for asa88

I trying to read in from a file but getting runtime errors can some one help find the .txt file as an attachment [CODE]#include<iostream> #include<set> #include<stack> #include<queue> #include<algorithm> #include<fstream> using namespace std; int main() { const int size= 7; char input[size]; fstream nameFile; nameFile.open("words.txt"); if(!nameFile) { cout<<"error cannot open file"<<endl; …

Member Avatar for NathanOliver
0
2K
Member Avatar for atticusr5

Hello, So I am just starting to really use Make files in Linux, and I am getting the following error when I try to "make": c++ -c main.cxx In file included from main.cxx:2: LinkedList.h:39:26: error: LinkedList.cxx: No such file or directory make: *** [main.o] Error 1 Here is my make …

Member Avatar for atticusr5
0
109
Member Avatar for Mossh

Hello all, I dont know if this is the right area but anyway Heres my situation: I have a software that updates 2 devices firmware's, the software communicates with the devices via Serial Cable(RS-232) , my problem is: I only have 1 serial(COM) port in my motherboard, and i need …

Member Avatar for Mossh
0
185
Member Avatar for David_Omid

Hey guys, I am making a calculator. It has two "screens", one showing input and one showing output. When the equals button is pressed on the calculator, the calculation is shown on the output screen. I have come across this problem: Let's say I type into the input screen "10" …

Member Avatar for David_Omid
0
101
Member Avatar for alikeshvari

Hi every body I want to write a program that get a char value and put it in the pointer array until the user reach to end of line. what is the problem with my code. my code: #include <iostream> using namespace std; int main(){ char str ; int lenght=1 …

0
24

The End.