51,592 Topics

Member Avatar for
Member Avatar for fadia

Hello guys.. I have this tutorial that i keep getting errors on no matter what i've tried.. Would someone kindly check it out for me?! Here is the question: [B]Q1:- Write a program that reads students’ names followed by their test score. The program should output each student’s name followed …

Member Avatar for jonsca
0
110
Member Avatar for rookanga

I am amost done with the code but I need a little bit more help I need to add the bubble sort code & write exchange increment line and add the selection sort code & write exchange increment line, but I don't know how to do it can anyone help …

Member Avatar for Fbody
0
249
Member Avatar for A Tripolation

Hey all. I'm really new to programming and would like some help, if you all don't mind ;) I'm not actually having trouble with the programming, but rather, what I'm being asked to do. Here is what I'm supposed to do (and yes, it is an assignment, but I'm only …

Member Avatar for A Tripolation
0
168
Member Avatar for freddyvf

i am using turbo c++. can you please tell me how to make two or more cpp or exe file together one.

0
88
Member Avatar for ITfav

Hey guys, i'm confused... wat's e diff btn [B][COLOR="Green"]LPD3DXMESH [/COLOR][/B]and [B][COLOR="green"]ID3DXMesh[/COLOR][/B]? Including their uses and so forth... help me understand e diff. Ok, i'm learning Direct X 9. Thx in advance! :icon_smile:

Member Avatar for ITfav
0
145
Member Avatar for tomtetlaw

When I try to compile this: [code=c++] void *BaseEnt::GetVar(char const *varname) { char name = *varname; switch(name) { case "id": return (void*)id; case "name": return (void*)name; case "count": return (void*)count; default: return (void*)NULL; } } [/code] I get these errors: [code] ------ Build started: Project: Test Classes, Configuration: Debug Win32 …

Member Avatar for slackingjuggalo
0
716
Member Avatar for nevets04

Why are there so many people doing c++. I've heard even from c++ coders, that python is better. Is this maybe because c++ has been around longer? What do you think the future of python is? Do you think It will eventually beat out c++?

Member Avatar for jbennet
0
227
Member Avatar for JaBa

Hi! I make c++ programm for school and I have problem with array rotation for 90 degree. I make array rotation from one example, but there is an array rotation on wrong way, I need to make it to rotate to other way. So please help me. Here is code: …

Member Avatar for Clinton Portis
0
107
Member Avatar for nateysmith

[CODE]#include <iostream> using namespace std; int main() { int TESTS = 0; int testScore[TESTS]; int testNum = 0; int a; double total = 0; double average; testNum = 0; cout<<"How many scores are there? "; cin >> TESTS; cout<<"Enter a score: "; cin >> testScore[testNum]; while(testNum < TESTS && testScore[testNum]) …

Member Avatar for nateysmith
0
2K
Member Avatar for xxunknown321

Write a C++ program that ask the user for the name of a file. The program must have a function that prompt the user to enter a file name and open the file. The program should display the last ten lines of the file on the screen. Each line of …

Member Avatar for xxunknown321
0
187
Member Avatar for gcardonav

Hi guys: The following code is supposed to the following: 1 - Receive a random number and divide the number by 1000 2 - Then it needs to check if the number is greater than the series number and the cut point and convert the divided random number to either …

Member Avatar for VernonDozier
0
138
Member Avatar for NinjaLink

My question is, how do you calculate the "Completion Time" as I am alittle confused about it. Do I add the service times and the result is the completion times? Thank you to anyone who helps Jobs --- Service Time -- Arrival Time -- Wait Time J1 --- 2 --- …

0
53
Member Avatar for manoj.pg

If I have the class name in a string varibale, how can I instantiate an object of that class? I am just thinking of COM and CORBA implementations where C++ object is instantiated from the data in the stream. How can I implement it?

Member Avatar for mrnutty
0
683
Member Avatar for jessicamelillo

Hi! I'm currently taking a computer programming course at Wagner college and I have a project due this week that I am completely stumped on. these are the guidelines: [I]This will be a something like a “compatibility program”. 1) You will ask the user their name, and store it. 2) …

Member Avatar for jonsca
0
104
Member Avatar for ArvindRaja

Recently, I stumbled across WinBGIm and decided to resurrect a small game I had made in turbo C++ a long time ago. Anyways, I succesfully got WinBGIm, did the necessary steps. After removing all the errors and building the project in Visual Studio 2008 Professional, I get this error (with …

Member Avatar for md37
0
216
Member Avatar for AdRock

I have got an example for cplusplus.com for converting a string into a char array so i can split in into tokens and adds to a vector and it works fine in the main method but if i try and create a separate function and pass a string as a …

Member Avatar for iamthwee
0
754
Member Avatar for mitsuevo

[code] float decimal = 2.345324 float dec_points = decimal%1; [/code] hey guys, I have a small but trivial problem... i have been trying to do the above but i keep getting a error... "error C2296: '%' : illegal, left operand has type 'float'" Anyone got a clue? Thanks guys!

Member Avatar for Dave Sinkula
0
78
Member Avatar for sfrider0

I'm drawing a sphere and some ground. I used GL_POLYGON to draw a rectangle and colored it green. When I added a sphere, my ground just turned black. Is this because the sphere is a 3d object and the polygon is 2d or is there something else? Here is the …

Member Avatar for sfrider0
0
162
Member Avatar for mar000m

please if any one can help me ....i need a radix sort code for names..... all the names are data members in (node class) i just cant write the code so if any one can help me .....

Member Avatar for dibilasd
0
99
Member Avatar for ching
Member Avatar for RajNOX

[CODE] D:/Documents/NetBeansProjects/cap/main.cpp:33: undefined reference to `_imp__pthread_create' D:/Documents/NetBeansProjects/cap/main.cpp:34: undefined reference to `_imp__pthread_create' D:/Documents/NetBeansProjects/cap/main.cpp:35: undefined reference to `_imp__pthread_join' D:/Documents/NetBeansProjects/cap/main.cpp:36: undefined reference to `_imp__pthread_join' build/Debug/MinGW-Windows/main.o: In function `Z8cancelerPv': D:/Documents/NetBeansProjects/cap/main.cpp:47: undefined reference to `_imp__pthread_kill' D:/Documents/NetBeansProjects/cap/main.cpp:48: undefined reference to `_imp__pthread_exit' D:/Documents/NetBeansProjects/cap/main.cpp:51: undefined reference to `_imp__pthread_exit' [/CODE] this is the error i got when i compile …

Member Avatar for RajNOX
0
792
Member Avatar for ch.ankit87

HI can anyone help me to write this programe in c Q ; WRITE A PROGRAM TO DETERMINE AND PRINT THE SUM OF THE FOLLOWING HARMONIC SERIES FOR A GIVEN VALUE OF N; 1+1/2+1/3+14+....................1/N THE VALUE SHOULD BE GIVEN INTERACTIVELY THROUGH THE TERMINAL

Member Avatar for nirav99
0
117
Member Avatar for bigsurya

Can I have a FOR Loop of in the following manner:[for(int i=0;(s[i]!='\0')|| s[i]!=' ';i++)][/CODE=C++] where 's' is a character array

Member Avatar for bigsurya
0
120
Member Avatar for mcap61

Hey guys, I'm trying to write something to a .txt file from within my program using ofstream. I have this function names show_results() which is a bunch of cout statements that are connected to a class and a bunch of member functions. But the function show_results is all cout statements. …

Member Avatar for jonsca
0
94
Member Avatar for samsons17

I dont know whats wrong with my code.. when i entered the value,there was nothing appeared on my screen.. I've tried put the single quote like this one : case '1' : cout<<Very Acidic; break; ..but it was only works for the acidic value..When i entered the value more than …

Member Avatar for samsons17
0
87
Member Avatar for gandolf III

Hi, this C program is to remove duplicates. HOwever it doesnt always print out a result and when it does it screws it up sometimes. [CODE]# include <stdio.h> # include "simpio.h" # include "genlib.h" main() { int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,word; word=getchar(); a='a'; b='b'; c='c'; d='d'; e='e'; f='f'; g='g'; h='h'; i='i'; j='j'; k='k'; …

Member Avatar for dkalita
0
112
Member Avatar for ured

I am trying to read a decimal as a char and store it in an array by ignoring "." like if I have 0000.9876 will be stored as 9876. The program works fine...but it doesn't stop when i debug it.....I need help please ........... #include<iostream> #include <ctype.h> using namespace std; …

Member Avatar for jonsca
0
108
Member Avatar for Noopur7
Member Avatar for gaurav sinha
-3
313
Member Avatar for luskbo

I trying to write a program that uses a getline to read from a txt file. I need it to read from the file until it reaches a line that has "$$$" in it. I can get it to read in the file like this no problem. [CODE] //assuming all …

Member Avatar for mrnutty
0
182
Member Avatar for robertmacedonia

Hello to all, can anyone please explain to me the following: I know how to use the copy constructor, I know that it's used only in the initialization, when i wanna initialize a new object using an old object... But what I don't understand is how will I know when …

Member Avatar for mrnutty
0
141
Member Avatar for samsons17

i not sure what is the single quote means... the example like this : if (value=='a') Thank you 4 helping :)

Member Avatar for mrnutty
0
80
Member Avatar for LennieKuah

Hi there, Being a newbie to C#Net 2003, I am having problem trying to retrieve data from a specific clicked row on the DataGrid to display the data on the TextBox on the FORM. This is the structure of the DataGird:- Col0 = CustomerId Col1 = First Name Col2 = …

Member Avatar for LennieKuah
0
167
Member Avatar for jhanthem

for the XsineX function I have to calculate xsinx for each value in x then store in result. I need to call on the sin function to do calculations. I tried but I know its completely wrong, any help please?? [icode] #include <iostream> #include <cmath> using namespace std; // uses …

Member Avatar for vmanes
0
165
Member Avatar for ukbassman88

Could someone please help me figure out what is wrong with my program? # include <iostream> # include <string> using namespace std; void water_state(); float celsius_to_fahrenheit(float c); float celsius; float fahrenheit; int main() { float celsius; float fahrenheit; cout << " Enter Temperature in degrees celsius: "; cin >> celsius; …

Member Avatar for vmanes
-1
79
Member Avatar for samsons17

Hi.. Is that possible to us to set the range using the switch statement? For example i want to do this : if ph==7 is neutral if ph<7 is acidic if ph>7 is alkali could i just write like "case ph<7 :" i know i could do the case one …

Member Avatar for vmanes
0
128
Member Avatar for gretty

Hello I am not sure if my function below will completely delete a linked list. I am worried it will delete every element of the list except for the head(first node)? For example; If I have this linked list below [QUOTE] L -> 1 -> 2 -> 3 -> 4 …

Member Avatar for mrnutty
0
87
Member Avatar for axed

Sorry for a duplicate post. The other post had gotten messy and since I was not allowed to delete it, I am starting a new post. Hi, here are the errors I am getting when i compile on cygwin. It is weird that the code compiles and runs perfectly on …

Member Avatar for axed
0
212
Member Avatar for Bunda350

ran into a problem i know this is asking for me to calculate the product of a coulmn and row but im not sure where to begin. I know that rowData tells us the value in a row and nRows specifies the number of rowData and the same with nCols …

Member Avatar for axed
0
211
Member Avatar for Bunda350

I want to test the code i wrote which is part of my assignment double sine(double x, double tolerance, int & limit) { int a = 1; double b = x; double z(0.0); do { b=(-z*x*x)/((2*a)*(2*a+1)); z=b; z+=1;} while(fabs(b-z)>tolerance); limit= a; return b; } im supposed to use a main() …

Member Avatar for Bunda350
0
298
Member Avatar for wardensmat08

Hi, I'm having a little problem in my loop with the string array. I want to take a record for some student, but when I loop the function, the getline() did'nt work. It only work at the first loop, then it will skip it. My code is like this [CODE]#include …

Member Avatar for wardensmat08
0
174
Member Avatar for thetechguy

I'm newish to c++ and even newer to ubuntu I tried linking and this is what I got: g++ -o calculator *.o -lcrypt -lm main.o: In function `main': main.cpp: (.text+0x1ea): undefined reference to `SAMSErrorHandling::Initialize()' main.cpp: (.text+0x2fa): undefined reference to `SAMSErrorHandling::HandleNotANumberError()' main.cpp: (.text+0x322): undefined reference to `SAMSPrompt::UserWantsToContinueYOrN(char const*)' collect2: ld returned …

Member Avatar for thetechguy
0
191
Member Avatar for UKmason

I have gotten started on my while loop but I'm kinda stuck I dont know where to go from here :( My assignment is to write a program to read in 6 numbers from the keyboard and then indicate whether any of them were larger than 500 or smaller than …

Member Avatar for jonsca
0
137
Member Avatar for Towely

I know this is probably a really easy question, but my teacher failed to mention how to do it, so here goes. I'm making a simple program that tells a user if a sequence of given numbers are even or odd. Here's what the program should look like: [CODE]Enter a …

Member Avatar for Towely
0
144
Member Avatar for snehil_khanor

Hey.. I wanna make a calculator .. which takes input as a string... example: Input : "1 + 2" Output: 3 "1+2" is passed as a parameter which is in the format of a string. The return value is 3 which an integer format. calculator needs only to perform +,*,-,/ …

Member Avatar for snehil_khanor
0
5K
Member Avatar for axed

Hi, here are the errors I am getting when i compile on cygwin. It is weird that the code compiles and runs perfectly on Visual Studio. $ g++ -o mainUnix.out mainUnix.cpp [code]mainUnix.cpp: In function `int main()': mainUnix.cpp:47: error: expected primary-expression before numeric constant mainUnix.cpp:47: error: expected `;' before numeric constant …

Member Avatar for axed
0
171
Member Avatar for jesseb07

hey, had a question that I couldn't figure out. I'm writing a program for linux and I need to save things to a person's Desktop. Because of that, I need to know their username. I am aware of the linux commands whoami, id, etc, but they only print the current …

Member Avatar for jbennet
0
8K
Member Avatar for thetechguy

I'm reading this one book on c++ and am having difficulty making an executable. I'm a n00b at c++ and Ubuntu so I don't know what I'm doing wrong. I've compiled all my cpp files into object files and now I need to link it but when I try that …

Member Avatar for thetechguy
0
119
Member Avatar for Sallad

For part of my assignment, we are to write a function that overloads the * operator so that we can multiply 2 list<short int>. We are given the BigInt.h and part of BigInt.cpp (It'd be easier if we didn't have to use this format, I know, but we're supposed to …

0
123
Member Avatar for GPXtC02

i'll start typing a command in the telnet module to communicate with my telnet server after i've already been connected and the server will suddenly drop me, exit telnet, and bring up the cmd prompt. what in this code is doing this? [code]void do_handleclient(int connsock,struct sockaddr_in *client_addr) { // Communicating …

Member Avatar for GPXtC02
0
106
Member Avatar for axed

I wrote a program to solve a system of linear equations. It works fine with the VS compiler. But when I try to run it using Cygwin, I get a seg fault(core dumped). But it does not say where the seg fault is. I am using the following commands: to …

Member Avatar for axed
0
369

The End.