49,756 Topics
![]() | |
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 … | |
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:-/ | |
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 … | |
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 … | |
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] | |
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 … | |
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 … | |
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(). … | |
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 :/ | |
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 … | |
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 … | |
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(); } | |
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 | |
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 () … | |
hey. can i transfer pictures through sockets using c++? how can i do it if its posible. | |
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. | |
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. … | |
![]() | 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 … |
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 … | |
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 … | |
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 … | |
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, … | |
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(); … | |
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 … | |
#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(); } | |
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. | |
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: … | |
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 … | |
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 … | |
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 … |
The End.