49,757 Topics

Member Avatar for
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
270
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
410
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
185
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
667
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
740
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
304
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
406
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
322
Member Avatar for helloworld1234

Hello, I have a school assignment that i really need help with. I am supposed to create an X shape with asterisks using for loops. I am terrible at for loops so i was wondering if you guys could help me out a little in figuring out the best solutions. …

Member Avatar for tinstaafl
0
3K
Member Avatar for lewashby

I have been told that in C++ the concept of a string does not exist. A string is just an array of type char. So in the following code, is message an array because it doesn't really look like one? char *message = "I am having trouble understanding pointers"; std::cout …

Member Avatar for lewashby
0
243
Member Avatar for GottaLove

Suppose I have a code: Class A have items which is pushed into a vector...I want to access Class A element from class B through A's vector.. class A { friend class B; vector<A> data; //store info in vector }; Class B { void showDataInClassA(); A a; } void B::showDataInClassA() …

Member Avatar for Ancient Dragon
0
918
Member Avatar for chandnigandhi

I am creating a project in turbo c++ and it is based on kids and i want to implement the speech like it will speak(a for apple).so is it possible to do this?and if possible then please help me out.

Member Avatar for nova37
0
211
Member Avatar for sarah.mathieson.7

I am trying to write a program that creates a new file every time I use the application. Right now, this is what I am doing: outfile.open("Application.txt"); outfile<<"First Name: "<< firstName <<" "<<"Last Name: "<< lastName<<" "<<"Student Number: "<< studentNumber << endl; outfile<<"Email Address: " << emailAddress <<" "<< "Major: …

Member Avatar for vmanes
0
3K

The End.