49,756 Topics

Member Avatar for
Member Avatar for Karlwakim

Hi everybody, I am learning c++, i tried to learn java but it seams hard. do you personally think that learning c++ will make me understand OOP in a bad way ? Is it better to learn c++ before java or vice versa ? Is java slower than c++ (Some …

Member Avatar for Karlwakim
0
434
Member Avatar for Hajira Khanum

Hi! I would like to develop applications using c or c++. but i have no idea how to start with it, i did try the search engine but didn't get a satisfactory answer. can i get some ideas and examples please:-/

Member Avatar for LRRR
1
104
Member Avatar for daviddoria

I have been working with this code for quite a long time now, and I continually refactor and refactor and just keep running into different forms of the same problem. In the last couple of weeks I've tried to take a step back and really think about the design, motivated …

Member Avatar for rubberman
0
481
Member Avatar for 8367144q

I've got a worksheet which asks me to ask the user to enter a beginning and ending value. Create a for loop using these numbers. Also ask the user to enter another number. The program will search for multiples of this value. a. The total of all values in the …

Member Avatar for Moschops
0
142
Member Avatar for the_kitoper

Why is this? [CODE] int kitty(GtkWidget* widget, float* foo) { if(*foo != .5f) std::cout << "this usually occurs" << std::endl; } int otherFunc(void) { float foo = .5f; //assume widget has been created g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(kitty), (gpointer)&foo); }[/CODE]

Member Avatar for vijayan121
0
197
Member Avatar for kchyn

I have code that is very computationally intensive and very SSE-capable. The vs2010 compiler only supports up to SSE2 (from what I remember) So my obvious choice is to switch to a compiler that supports SSE4. I don't want to write any extra parallelizing code, (I just want to enable …

Member Avatar for vijayan121
0
234
Member Avatar for Tester2

Found some neat graphing software for 2D and 3D applications at CodeProject. Looking forward to using with MS VC++ Express, which I just downloaded and installed. Can I do this? Is it legal? The creator offers what seem to be some options, but I'm not sure the header files are …

Member Avatar for Tester2
0
356
Member Avatar for mrnobody

Hi, I've been searching the net to try to find solution but i still can't find it despite searching it for hours. I've got a user control in a form. From the user control, I plan to do 2 things. 1) In the parent form, i got function example FunctionX(). …

Member Avatar for mrnobody
0
630
Member Avatar for Panathinaikos22

Hello, how i can draw text to monitor, i dont want to draw it on program form, i just want to print an text in the screen :) TextOut & DrawText i think draw text on form :/

Member Avatar for dmanw100
0
184
Member Avatar for sasho648

I just start to learn it and I tried to find out what are the difference between virtual and not virtual class functions. For this a use a base class with a virtual function which Constructor made the impossible possible - here is example how you can cheat the compiler …

Member Avatar for LRRR
0
158
Member Avatar for hamby

Hello daniweb, I've been having problems with a program I'm trying to make, in my function definitions, I'm trying to reference the output of one function in the other's definition, but not sure how to, I'm guessing pointers could help me but I'm not sure how to use them: These …

Member Avatar for Moschops
0
155
Member Avatar for sameerge

hi guys Can anyone write a C++ program for me which convert military time to standard time without using return function. write a simple program which start from #include<iostream.h> #include<coino.h> void main() { . . . . . . . getch(); }

Member Avatar for Narue
0
1K
Member Avatar for cool_zephyr

could anyone please help me to create a sphere using triangles?? i've searched a lot but all of them only describe creating a sphere using some library packages

Member Avatar for cool_zephyr
0
1K
Member Avatar for Karlwakim

Hi everybody, I wrote a game in which you have to guess a number generated randomly,but when i try to assign a random number to the variable, it just doesn't work but it compiles fine. The code : [CODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main () …

Member Avatar for Karlwakim
0
150
Member Avatar for sidra 100

hey. can i transfer pictures through sockets using c++? how can i do it if its posible.

Member Avatar for pseudorandom21
0
157
Member Avatar for Run.[it]

Could someone explain the use for both? Ive got a rough idea that cin.get() pauses the program and cin.ignore() is to clear the input buffer. But could you give me examples when you'd use them and why? Cheers.

Member Avatar for Narue
0
3K
Member Avatar for c++_fem

Hi, I'm trying to write text using SDL_ttf I've set up everything according to this tutorial on lazyfoo ([url]http://lazyfoo.net/SDL_tutorials/lesson03/windows/msvsnet2010e/index.php[/url]) but when I compile my program I keep getting this error: fatal error LNK1104: cannot open file 'SDL_ttf.libkernel32.lib' Did anyone have the same problem? I don't know what I'm doing wrong. …

0
138
Member Avatar for DigitalPackrat

I have been assigned to write a program to print the calendar of a given year. Its almost complete, but, I haven't yet found a proper algorithm to find the first day of the year which is required by the function to print the calendar year. Will provide the code …

Member Avatar for bbman
0
900
Member Avatar for MosaicFuneral

As the title says - it's reporting, "The specified service does not exist as an installed service." I'm running this as an administrator and have a successful ALL_ACCESS handle to the SCM. At some earlier points I did have some trouble with the narrow to wide conversion. I believe that's …

Member Avatar for MosaicFuneral
0
288
Member Avatar for senergy

Hello, how can I make my program (I'm using dialog as main window) to "block" everything (like when u are running some program that needs admin permissions) so u won't be able to do anything until u select "yes" or "no" except minimize and exit + what's the message for …

Member Avatar for Labdabeta
0
269
Member Avatar for Despairy

Hi i would like to build a c++ game with SFML graphic library now i see sprites can move using floats ( sprite.move(+x,+y) ) how do i connect between the graph ( configured by a matrix ) and the graphic library? since the graphic library uses floats and set positions …

Member Avatar for Despairy
0
518
Member Avatar for coxxie

You are the owner of a hardware store and need to keep an inventory that can tell you what different tools you have, how many of each you have on hand and the cost of each one. Write a program that initializes the random-access file hardware.dat to 100 empty records, …

Member Avatar for VernonDozier
0
2K
Member Avatar for SaimaAsif

Error: Debug Assertion failed: Expression: BLOCK_TYPE_IS_VALID(pHead->nBlockUse) Code: #include "stdafx.h" #include<iostream> #include<stdlib.h> #using <System.dll> #include< math.h> #include< time.h> #include<List> using namespace System; using namespace System::Collections::Generic; using namespace System::Linq; int someSize=2000; # define SIZE 20 class queue { int aMsg[SIZE]; int front; int rear; public: queue(); ~queue(); void insertMessage(int i); int removeMessage(); …

Member Avatar for thines01
0
246
Member Avatar for sodha125

Write a program to move a character around on the screen in response to user key-presses (you’ll have to decide which keys to use for up, down, left and right - combinations like t b f and h work well: or if you’re more ambitious you could find out the …

Member Avatar for Labdabeta
0
127
Member Avatar for Captain Neo

#include<iostream.h> #include<conio.h> #include<math.h> void main() { clrscr(); int n,x,i,j; float p,fact=1.0,sum=0.0; cout<<"\n\tEnter the number: "; cin>>n; cout<<"\n\n\tEnter the Value of 'x': "; cin>>x; for(i=1;i<=n;i++) { for(j=(2*j-1);j>0;j--) { fact=j*fact; if(i%20==0) p=(-1)*pow(x,(2*i-1)); else p=pow(x,(2*i-1)); sum+=p/fact; } } cout<<"\n\tThe sum is "<<sum; getch(); }

Member Avatar for PrimePackster
0
178
Member Avatar for Zssffssz

In my program (not the compiler) how would I implement a 'tag' system, for example : dpkg [B]-i[/B] hello I am not skilled enough to go through gcc's or dpkg's sources so sone help would be nice.

Member Avatar for rubberman
0
70
Member Avatar for Dman01

Hi. I want to read through a file and search for variables saved in it. However if the stream reads the last char I got errors like EOF. For example the following code would not work as intended to : [CODE] bool BaseFileReader::Valid() const { if (!File.is_open()) std::cout << "\n\nERROR: …

Member Avatar for Dman01
0
247
Member Avatar for yinyue

I have run this code below but it have a few error..hope someone could help me to solve this problem..tq..:) #include <stdio.h> #include <string.h> #include "cv.h" #include "cvaux.h" #include "highgui.h" int nTrainFaces=0; int nEigens=0; IplImage ** faceImgArr =0; CvMat * personNumTruthMat =0; IplImage * pAvgTrainImg = 0; IplImage ** eigenVector …

Member Avatar for yinyue
0
462
Member Avatar for mustad104

I try to implement ford fulkerson algorithm but i have problems at my_alg function.I think the reason for this problem is find_edge function.since when i find the edge and increment its flow(asker_sayisi),at the next line it seems to be incremented but at the next line when i find the same …

Member Avatar for Clinton Portis
0
721
Member Avatar for HacruLeian

hello, i want to get some guidance from the reader who read my post. I'm doing a game called deal or no deal using c++ and i can't think of other way to print the box's number instead of printing the value inside. what i want to do is, user …

Member Avatar for LRRR
0
2K

The End.