49,757 Topics

Member Avatar for
Member Avatar for FEARmike21

Hi, I just started my C++ class a couple weeks ago and I am stuck and having a really diffcult time understanding which commands to use in my programs. I don't even know where to look to get a list. Anyways, basically what we have to make our program do …

Member Avatar for rudasi
0
93
Member Avatar for Argo54325

Ok, something very wrong is going on with my program. When i run it the numbers it is giving me are sometimes right but are also wrong. H (the first letter in the word) is both = to 0 and 1 (wtf?). Any ways below i'll show you want i …

Member Avatar for VernonDozier
0
1K
Member Avatar for rmlopes

Hello all, I am trying to use the #if directive to compile extra functionality acording to some class template parameter defined integer constant. What I want to do is this: [code=cpp] struct A1{ static const int _AINT = 0; }; struct A2{ static const int _AINT = 1; }; template< …

Member Avatar for siddhant3s
0
211
Member Avatar for FEARmike21

I am trying to get a program working, and im half way there, I think. What the program must do is take input from the keyboard and then capitalize every first letter of every word. Here is my entire program so far... [code] #include <stdio.h> #include <iostream> using namespace std; …

Member Avatar for siddhant3s
0
143
Member Avatar for kartheepanmirra

Hi i have a requirement where a cpp file should load a dll viz gzip.dll.then the cpp should call few methods in the dll.well im able to call the methods with no parameters but im unable to call the methods with parameters.if im trying to call methods with parameters i …

Member Avatar for kartheepanmirra
0
439
Member Avatar for mohammad8065

Hi !!!! I want to write a program that print the character # like a triangle in the middle of the page.I mean like this : # # # # # # # # # # # # # # # # # # # # # # # # …

Member Avatar for siddhant3s
0
253
Member Avatar for C++.java

// Sum of Squares and Cubes.cpp : Defines the entry point for the console application. // [code=cplusplus] #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int n,j; cout<<"Enter a Number:"; cin>>n; for(j=1;j<=n;j=j+1) cout<<j*j<< " "; cout<< endl; int a,b,c,sum; a=n+1; b=2*n+1; c=n*a*b; sum=c/6; cout<<"the sum …

Member Avatar for siddhant3s
0
173
Member Avatar for lil_panda

Is there a way for me to use an obj-C class with my C++ program? If so, what special parameters do I have to specify during the compilation phase, and if I needed, changes to my source code files?:-/

Member Avatar for ArkM
0
167
Member Avatar for siddhant3s

I have read prior post on the forum but I came up with few specific questions about Porting Unix Socket(hereby calling it BSD socket) to Win32 Platform : First of all, I am a native Linux C/C++ Programmer. I program in Ubuntu with GCC. But, I usually also port my …

Member Avatar for siddhant3s
0
1K
Member Avatar for arussell817

Hello, I looked around and saw similar problems, but None of the answers seemed to help my situation. Im almost done with my HW Just have come across this minor bump. The error is in the title, and is happening in my addressEntry header, or cpp. not sure: : error …

Member Avatar for siddhant3s
0
447
Member Avatar for jeevsmyd

Hi friends.. Last day at school my teacher gave the following code.. But it is not working.. 16 errors.. I am a beginner in C++ .I badly need your guidance a help in finding the errors... the for loops is all wrong.. To be frank I don't understand the working …

Member Avatar for siddhant3s
0
366
Member Avatar for mikemea

[B]cannot convert parameter 1 from 'char' to 'char *'[/B] calcCharges(type_of_gas, &rate_of_gas, number_of_gallons, &total_gas_of_price, car_wash, &price_of_car_wash, &total_cost);

Member Avatar for ArkM
0
75
Member Avatar for rickster11

Ok, stuck on homework. The program is supposed to read a list of presidents from a binary file and display them. I have it all working..except..when it gets to Truman...it just keeps repeating his information. I know its still going in the loop, but for some reason the pointer stays …

Member Avatar for rickster11
0
143
Member Avatar for shamila08

hello, dear all. below is my program code. the problem is an half of my output is zero for entries of matrix for n greater than 4. [code=cplusplus] #include <stdio.h> #include <stdlib.h> #include <iostream> #define MAX 100 int num[MAX][MAX]; int n; int nrows = 0; using namespace std; void print(int …

Member Avatar for shamila08
0
140
Member Avatar for Yersey

Hello, I am fairly new to C++ and am having a bit of trouble reading in a text file to my program which contains numbers(integers) and names(strings) and checking for spaces in the names(strings).I basically am reading in a .txt file which contains numbers and letters. In this file, the …

Member Avatar for Ancient Dragon
0
167
Member Avatar for crewxp

When declaring get_color and get_size, my compiler gives me errors, and I don't know how to solve them. It's probably something really simple, but I think the more I try at it, the more messed up my code becomes (hence the 'this' and '->' references) marble.cpp(11) : error C2143: syntax …

Member Avatar for Rashakil Fol
0
158
Member Avatar for dvsConcept

Im writing my final project and i have everything in one .cpp file and i was wondering if someone could tell me in detail how to go about putting things in their own file and leaving the main function by itself in the main file. for example i have some …

Member Avatar for dvsConcept
0
100
Member Avatar for Argo54325

Ok so i made a decoder for this that gets the letters from the numbers that this encoder gets. Problem is that i think the numbers its giving me are wrong and i can't seem to figure out whats causing the problem. Help please! :( [CODE=C++]#define _CRT_RAND_S #include <iostream> #include …

Member Avatar for Argo54325
0
104
Member Avatar for StainlessSteelR

This is what I'm suppose to do: "Create a while loop to read in the corporate sales data from the pgm3.dat file and create a report listing data for each division as well as some of the summary data described in Programming Challenge 12 in the textbook. Inside the loop, …

Member Avatar for Ancient Dragon
0
118
Member Avatar for cppStudent

Hi [CODE]int** numberLists = new int*[count];[/CODE] I'm having difficulties understanding this line of code, I've just started programming in c++. I think I got the basics of pointers but I can't find any helpful "enough" info about arrays of pointers. I understand that an array of pointers to integers is …

Member Avatar for death_oclock
0
144
Member Avatar for gyagyus

Hi! I wrote two functions in order to access two private data members of a template class and I got the messages in the title every time I call these functions(getNcols(), getNrows()). I'd be very grateful for your help, guys... (Without the "template<class T>" before the friends, I got linker …

Member Avatar for gyagyus
1
235
Member Avatar for Argo54325

When i runt he code and try to get the size of the 2 files something goes wrong with the msgIn file. I'm using the same method for both files and the bookIn will work but msgIn just returns 0 as if it never ran. this is the method that …

Member Avatar for Salem
0
136
Member Avatar for bradbobak

Hi, does anyone know what the message 0xc088 is? My PeekMessage(...) loop is getting this message code, but I cannot find it in the header files (grep'ed c088). It seems to be intersperced with WM_PAINT messages.

Member Avatar for William Hemsworth
0
61
Member Avatar for scrypt3r

Im trying to get my program to list certain types of drives etc but i dont know all the drive type names like "DRIVE_REMOVABLE" or "DRIVE_CDROM". does anyone have a list of the entries?

Member Avatar for Yiuca
0
109
Member Avatar for Argo54325

I'm trying to get a char back from the bookFile.txt but, when i run the program it returns nothing. I'm not sure if .get() if the right thing to be using. When i run this code i get the random number and the first letter of the msgFile.txt returned correctly. …

Member Avatar for nucleon
0
184
Member Avatar for fusi0n423

I have a project where I have to analyze 3 different hashing functions. I cannot get the cyclic shift hash to work with a bitwise OR. Everything looks fine to me am I doing something wrong? [code=cplusplus]int Hash::hash(string key) { unsigned int h = 0; for(int i =0; i < …

Member Avatar for nucleon
0
280
Member Avatar for alphabetanm

I understand the structure of a do while; however, when I start plugging in my statements, I am not gettng the result I want. The logic is wrong. Knowing the general form of the do while is: do statements while (condition) and wanting to write a do while code to …

Member Avatar for alphabetanm
0
94
Member Avatar for GadiK

Hi Guys, I'm trying to write a simple game of drawing rectangles and circles in a window. I've created a different class for each shape: RectClass and CircClass. Each of these classes has it own DrawShape() function which suppose to draw the shapes in the window with given coordinates argument. …

Member Avatar for Ancient Dragon
0
194
Member Avatar for odzky

Create a function w/c accepts as input the double numbers x1,x2,x3 and returns to the program the value of the average (x1+x2+x3)/3 as a variable parameter. #include<stdio.h> #include<conio.h> main() { i really dont know what next...........

Member Avatar for Ancient Dragon
0
276
Member Avatar for nparrish15

I've been working on a program and have hit a roadblock. I know conceptually what to do, but I'm having trouble implimenting it. Ok, so what it's suppose to do is take them randomly generated numbers that have been put in arrayints and factor them. This right now for an …

Member Avatar for arghasen
0
127

The End.