49,761 Topics

Member Avatar for
Member Avatar for wids101

Please enter your starting balance: 200 What would you like to do? B...Show Balance D...Deposit W...Withdrawal Q...Quit B Your balance is 200.000000 Press any key to continue . . . i put my set precision to 2 and it's printing 6 zeros. how come?

Member Avatar for vmanes
0
95
Member Avatar for dhayalanbalakrishnan

Guys I am trying To send a mail using C++ code i found from the net , when i compiled it it says In function `_Z13ChilkatSamplev': [Linker error] C:/Users/dhayalan/Documents/mail.cpp:10: undefined reference to `CkMailMan::CkMailMan()' [Linker error] C:/Users/dhayalan/Documents/mail.cpp:14: undefined reference to `CkMailMan::UnlockComponent(char const*)' [Linker error] C:/Users/dhayalan/Documents/mail.cpp:21: undefined reference to `CkMailMan::put_SmtpHost(char const*)' [Linker …

Member Avatar for Moschops
0
331
Member Avatar for on93

can anyone show me how to convert this linkList statement into Array ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class linklist { private: struct node{ struct student{ // node->info string name; int id; string prog; double cgpa; }st; node *link; }*head; public: void insFirstNode (string name, int id, string prog, double cgpa); }; void linklist::insFirstNode(string …

Member Avatar for on93
0
112
Member Avatar for MRehanQadri

#include <iostream> using namespace std; struct td{ int ** subj_no; }; int main(){ td p; **p.subj_no = new int * [7]; } If not then how should I accomplish this task? What's the corrected version?

Member Avatar for vmanes
0
173
Member Avatar for Chadtims
Member Avatar for wschamps42

So what would be the size of this array in bytes if on a 32 bit machine: double *arr[4] ;

Member Avatar for rubberman
1
272
Member Avatar for nitin1

can anyone please explain me in brief that how exactly this container work ? or can u giveme some link of this. i have tried to look on some links by google, but i am not much clear about my doubt. please help me if u can. thanks.

Member Avatar for mike_2000_17
0
414
Member Avatar for sfurlow72

If I have two objects (Intern and Manager) derived from an Employee class, could I create a function that would return a pointer to a new instance of one of the two derived objects by passing the type to the function. So, could I do something like this (I know …

Member Avatar for mike_2000_17
0
121
Member Avatar for Suzie999

Are there any limits to how many bitmap resources you can have embedded in your executable? If it matters, using visual studio 2010, windows platform.

Member Avatar for Suzie999
0
62
Member Avatar for MRehanQadri

int x; cin >> x; //If user writes 05 in x. Then I want that 05 should be printed when we cout << x; //If user writes 005 when prompted for x then printing x should print 005, because 005 may be a telephone extension. Is there any way?

Member Avatar for Ancient Dragon
0
189
Member Avatar for daino

I'm building pdf software with multiple dependencies (podofo) and when compiling I'm getting the errors. error: conflicting declaration 'typdef short int unit 8' error: conflicting declaration 'typdef short int unit 16' Would anyone know if there a CXX Define command I can use to bypass these errors? My CXX flags …

Member Avatar for daino
0
699
Member Avatar for boris90

Hi all, I have this if condition which never seems to be true, but should be! It's the part in the code where I pull the String^ from textboxes (the regUsername textbox) and compare the inputted username with the first word from every text file line. So every text file …

Member Avatar for Banfa
0
191
Member Avatar for group256

Hi, I'm trying to output a list of dvd titles along with some of their details. The problem is that it seems I can't get them aligned all pretty well. So I upload the screen shot as well as the code generating it. Please help me out here. This is …

Member Avatar for niario
0
14K
Member Avatar for krul.ezanie

can someone help me ? i have problem to make airplane seating program.. what it need is i ust put the details of the booker in the seat.. for example , when we want to check who already booked this seat,we click that seat and it will appear name and …

Member Avatar for deceptikon
-1
361
Member Avatar for nUmbdA

I am in a fundamentals class for C++ and having a bit of an issue. I know the problem is not fully understanding. I am not looking for the answer but to get direction to better understand what I am doing wrong and how to fix it. The Problem: Write …

Member Avatar for sumitseo
0
1K
Member Avatar for isrinc

`Inline Code Example Here`I am using a pair of pthreads that call a pair of functions for ping-pong dma data transfer that are used in a loop for data transfer from an acquisition board. For a large # of waveforms, I ultimately run out of PC memory and the program …

Member Avatar for Ancient Dragon
0
269
Member Avatar for mattster

Hi everyone, Heres my problem: I've installed Qt 4, and there is **no** qmysql.dll/.a in C:\Qt\4.8.4\plugins\sqldrivers\. I am running a MySQL database program and I get Database error: Driver not loaded. Theres not really a lot of help anywhere on google so hopefully DaniWeb will yet again prove itself as …

Member Avatar for mattster
0
394
Member Avatar for Melly3

New to c++. I'm trying to figure out how to use strcmp with array's . I need to see if a array holds the word "hello". I can't get my code to work quite right. What is it missing? #include<iostream> #include<cctype> #include<cstring> using namespace std; int main() { char a[30]; …

Member Avatar for deceptikon
0
250
Member Avatar for mishaelsp

Tryying to coun the numeber of comparicion but dont know how to count them include <iostream> #include <time.h> #include <stdio.h> #include <conio.h> using namespace std; //funcion para dividir el array y hacer los intercambios int dividir (int *array, int inicio, int fin){ int comp=0; int izq; int der; int pibote; …

Member Avatar for rubberman
0
166
Member Avatar for MRehanQadri

My Thinking: struct student { int *subjects_number = new int [NoOfSubjects]; } main() { int NoOfSubjects; cin >> NoOfSubjects; } Objective: students could have taken different number of subjects. Now modify the structure such that its variable subjects_numbers has type pointer to int so that we can store scores for …

Member Avatar for mike_2000_17
0
133
Member Avatar for lewashby

Segmentation fault (core dumped) Can someone please explain what that error message means? I'M tryin to use `strcat()` to add "0" to the left end of char `*argv[1]` I want it to do this only when the lenth of `argv[1]` can not evenly be divided by 3. So if I …

Member Avatar for mike_2000_17
0
418
Member Avatar for andika.kurniawan.121

I can see methods in stdio.h, iostream, etc in Turbo C++. But I confuse now because now I try to use code::blocks. Thank you if you solve my problem

Member Avatar for mike_2000_17
0
296
Member Avatar for MRehanQadri

Why the condition if ((a[0] == 'y') | (a[0] = 'Y')) is ALWAYS TRUE in the following code? #include <iostream> using namespace std; int main() { cout << "Enter 10 integers seperated by spaces: "; int array[10]; for (int i = 0; i<1; i++) cin>>array[i]; cin.ignore(); cout << "Do you …

Member Avatar for MRehanQadri
0
674
Member Avatar for spetro3387

I am compiling some source that is linked to two packages. One is OpenCV and the other is a driver library for an infrared camera. The company only provides a 32-bit version of the library via an rpm package. I compiled OpenCV from source and it's libraries are installed in …

Member Avatar for spetro3387
0
5K
Member Avatar for zubair_z

Guys Plz help me out of this.... i have to take common values from three arrays and if there is repetition of values code should display value only 1 time... plz help? here is my code` #include<iostream> using namespace std; int main() { int count=0; const int size=5; int arr1[size]; …

Member Avatar for tinstaafl
0
205
Member Avatar for FelineHazard

Hi guys What's the default pointer value in c++? Can I count on the compiler to set an uninitialized pointer to NULL? Is it compiler dependant? What's the "consensus"? Thanks! -FH

Member Avatar for FelineHazard
0
765
Member Avatar for deceptikon

The annoying use case is this: for (vector<int>::size_type i = 0; i < v.size(); i++) { cout << v[i] << ' '; if (i == v.size() - 1) { cout << endl; } } C++11 offers the `auto` keyword for initializer type deduction so that we can avoid verbose and …

5
307
Member Avatar for miles.sifflet

I am new to this forum so please excuse any errors i make! I have recently started programming in c++ and one of my first projects is making a console trainer for AssaultCube (FPS Game). I have some errors and have not been able to fix them. Here is the …

Member Avatar for miles.sifflet
0
407
Member Avatar for mexabet

I successfully created a C++ window but got an error message when I tried to add menus. I will surely appreciate any help to fix the issue. As follows is the code: #include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class …

Member Avatar for mexabet
0
183
Member Avatar for TheComputerGuy

I've been reading quite a few threads about creating new files if one doesn't exist...but I need it specifically for windows, in the current directory we are in. I've seen ` ifstream file; file.open("TehLeetFile"); if(!file.is_open()) cout<<"Tehleetness is busted!"; else cout<<"it work!!!!11!!!11!one!"; ` That's just checking to see if the file …

Member Avatar for tinstaafl
0
324

The End.