49,761 Topics

Member Avatar for
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
790
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
115
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
92
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
83
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
105
Member Avatar for Noopur7
Member Avatar for gaurav sinha
-3
276
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
178
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
135
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
79
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
163
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
126
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
86
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
209
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
210
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
272
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
172
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
188
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
142
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
168
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
117
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
121
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
104
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
340
Member Avatar for harryhaaren

Hey all, I'm currently struggling a bit with GUI building. What i want is a simple "click the button & a new widget appears" effect. Now how to go about implementing that i dont know. I've thought about storing each instance a widget in a std::vector. Seems a little messy …

0
50
Member Avatar for Shinedevil

I don't know where you sould put resources on this website so i'll just post it here. Also, if anyone can find the reason this program crashes occasionally and reply back, i'd be greatful! Thanks in advance. *Reminder: I'm not pro This is a simple(?) program that allows the user …

0
99

The End.