49,761 Topics
| |
Hi, I am a complete newbie and these are the first lines of code that I write, so please be patient :( I need to create a C# exe file that calls a c++ function What I wrote always throws an error at runtime: [code]Unhandled Exception: System.AccessViolationException: Attempted to read … | |
I'm reading casting functions(I wonder if this is proper name). I get difficult grasping dynamic_cast, static_cast, constant_cast and reinterpret_cast. Can anyone help me in "layman" terms differences and where we may use them? [URL="http://www.cppreference.com/wiki/start"]reference[/URL] and [URL="http://google.com"]google[/URL] | |
I'm programming using Visual Studio 2005 with Intel's Cilk SDK installed and learned there were some bad writing/reading happening at some specific memory locations, such as 0x00254c0( I can't remember the exact location, this is only an example). I have no idea what is going on at those locations and … | |
#include <iostream> using namespace std; bool isPrime (int num) { int counter=0; { for(int i=1; i<=num ; i++) if (num%i==0) counter++; if (counter==2) return true; } return false; } //prints primes void printPrimes (int num) { for(int i=2;i<=num;i++) if (isPrime(i)) cout<<i<<","; } // if there is no prime number between … | |
Hello there. I don't know if this should actually be posted in any of the C/C++ forums, but it is mainly an Assembly question so I take my chances here. In C/C++ it is possible to declare local variables as: [CODE=C]if(statement){ int var; // Use of the variables }else{ // … | |
I've been trying to do this problem for awhile now, but im not getting any luck. im just not completely understanding how single dimensional arrays work. any help would be great here's what i have so far, and then the problem is below. include <iostream> include <iomanip> using namespace std; … | |
hi please help actually i want to develop a software of image processing using either c++ or .net . please give more detail by using c++ langauge | |
AAROHAN 2010 OVERNITE MAINS PROBLEM :1 There are 3 kinds of money in a planet far away from the earth: Mone, Luck, and Rpin. There's a money exchange company in this planet. You must go to this company if you want to do some money exchange, and, more autocratically, this … | |
I'm having a problem with a part of my code that is designed to take a number (code) and extract the individual digits using a functino call for use later in the program. (At this point in the program I have alreay input the code number as an int) void … | |
hello guys, how can i print a random values and print random function? could you please write the code thank you | |
Hello guys, can somebody give me example of some simple DFS problem and solution (Source code). I just need to understand DFS algorithm. Thanks XTRobot | |
Hey everyone, I am trying to get my school program on pointer variable linked lists to work, but I have incountered a runtime error. When I try to print my data to the screen or a file, it does not work. I am not sure if my program is not … | |
Okay, maybe I'm just overlooking something but I need help. I have this program that reads in some numbers from a file and makes a linked list. The only function that is not working properly is one I called IsThere. Basically, it's just supposed to tell me whether or not … | |
Hey there! Summarizing the problem within the title is too hard but I tried. Let's just jump right in! I am pretty new (enough to only program in the console) to C++. Right now I am trying to code a hi-lo game. Where you guess if the next card is … | |
Hi! I need help for my c++. This is the code: [CODE]#include<iostream.h> #include<conio.h> void box(int x, int xx, int y, int yy); void box(int x, int xx, int y, int yy) { int xs,ys,i,j; xs=xx-x; ys=yy-y; for(i=1; i<xs; i++){gotoxy(x+i,y);cout<<"Í"; gotoxy(x+i,yy);cout<<"Í"; } for(j=1; j<ys; j++){gotoxy(x,y+j);cout<<"º"; } for(j=1; j<ys; j++){gotoxy(xx,y+j);cout<<"º"; } {gotoxy(x,y);cout<<"É"; … | |
I need to use an array of 5 elements. Each element of the array is a structure with 2 fields: the name of the hotel and a singly linked list of attendees staying in that hotel. Functions are: CheckIn CheckOut Transfer Count Print Quit If someone could just show me … | |
Alright guys, I have a really weird error here. I'm programming a program that lets you specify the red, green, and blue components then stores them in arrays and uses the colors when drawing shapes. The program worked perfectly until about five minutes ago. Nothing affecting that specific part of … | |
I am programming with visual studio express using the Dark GDK libraries, and If I wanted to conceal my hard artwork such as pictures and artwork I developed so that no one could take it from my project directory to play my game how can I compile all of the … | |
Hello all, I get the server source code below: [CODE]#include <winsock2.h> #include <ws2tcpip.h> #include <stdlib.h> #include <stdio.h> // Need to link with Ws2_32.lib, Mswsock.lib, and Advapi32.lib #define DEFAULT_BUFLEN 512 #define DEFAULT_PORT "27015" int __cdecl main(void) { WSADATA wsaData; SOCKET ListenSocket = INVALID_SOCKET, ClientSocket = INVALID_SOCKET; struct addrinfo *result = NULL, … | |
I wrote this code below and it isn't working giving me a stack overflow problem.Can someone please help me? [CODE]#include<iostream> using namespace std; int partition(int* A,int l,int r) { int v=A[r]; int i=l; int j=r; int temp; while(i<j) { while(A[i]<v) { i++; } while((i<j)&&(A[j]>=v)) { j--; } if (i<j) { … | |
Hello. :D I've been working on a project for couple months now, on Linux. When I invited a new team member, of course he came with his Windows. I want to hear [B]your opinion[/B] on how to make the development easy cross platform. Usually I would just tell him to … | |
hi i have a file dictionary.txt which contains a list of four-letter words which i have to read into a string vector. i have written the following code [CODE] char* char2str(char); //convert single char to null terminated string int main() { vector<string> dict; ifstream in("dictionary.txt"); char *temp, ch; int i=0; … | |
Why I try to run the following OpenCV program, it shows the following error : ---------------------------------------------------------------------- test_1.exe - Application Error The application failed to initialize properly (0x80000003). Click on OK to terminate the application. ---------------------------------------------------------------------- [CODE] #include "cv.h" #include "highgui.h" int main() { IplImage *img = cvLoadImage("C:\\face.bmp"); cvSetImageROI(img, cvRect(100,100, 100, … | |
HOW can i solve this program?..Write the definitions of the declared function prototypes of the given code. This program should be able to simulate ATM functionalities. For simplicity sake, this ATM can only handle one account and the initial balance will always have the same value every time the program … | |
hello...i'm currently a third year highschool student...and i was wondering if anyone can help me on how to use arrays and utilizing them in fstreams...i'm currently doing my case study and i'm stuck since i still don't have any idea on how to use arrays...our teacher didn't teach us about … | |
i need to draw a 2D graph in C++, so i had downloaded koolplot to draw it. But the condition is- i want to use koolplot under codeblocks IDE not quincy, dev++ or else, so how should i link them?? i tried to link the libkoolplot.a but it still showing … | |
ok could you please see my code [CODE]srand(time(NULL)); system("MODE CON: COLS=90 LINES=360"); system("TITLE Press ^<ESC^> to exit"); cout << "Press <ESC> to exit\n\n"; int milliseconds = 500; char key=0, esc=27; while(key != esc) { int villain = rand(); system("cls"); char wall = 177, flute = 14, hero = 2, life_hero … | |
i was wondering. of all the data structures like list linked list,stack,queues,graph of bfs and dfs. hashing,sorting,searching,arrays...heaps, can anyone of them be solved using computational methods and statistic like linear regression,quadratic regression,trapezoidal rule,simpson's rule..which is to improve accuracy of integral.. just wondering is it possible?? | |
Hello i am trying to construct a class for the first time...its called Field and is very similar to a vector in that it tries to store an array of double.. i am not able to compile the code..i get the error that field.h does not exist..pls see if u … | |
can anyone help me!? i have to create program to search word from text file, but i don't know how can i match word from input to text.. Can anybody help!!!?? |
The End.