49,761 Topics

Member Avatar for
Member Avatar for digonio

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 …

Member Avatar for kvprajapati
0
217
Member Avatar for Stefano Mtangoo

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]

Member Avatar for Stefano Mtangoo
0
65
Member Avatar for spetsnaz26

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 …

Member Avatar for spetsnaz26
0
118
Member Avatar for Gnawk

#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 …

Member Avatar for Gnawk
0
124
Member Avatar for strmstn

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{ // …

Member Avatar for strmstn
0
201
Member Avatar for shimbouzi

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; …

Member Avatar for Lerner
0
110
Member Avatar for shivam saxena

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

Member Avatar for Stefano Mtangoo
0
83
Member Avatar for vivekvxz

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 …

Member Avatar for Nick Evan
0
570
Member Avatar for mik3

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 …

Member Avatar for mik3
0
108
Member Avatar for empror9

hello guys, how can i print a random values and print random function? could you please write the code thank you

Member Avatar for Stefano Mtangoo
0
125
Member Avatar for XTRobot

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

Member Avatar for WaltP
0
107
Member Avatar for atticusr5

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 …

Member Avatar for tetron
0
87
Member Avatar for NitaB

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 …

Member Avatar for NitaB
0
299
Member Avatar for DavidDD

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 …

Member Avatar for WaltP
0
110
Member Avatar for aianne

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<<"É"; …

Member Avatar for WaltP
0
969
Member Avatar for tshudyb

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 …

Member Avatar for tshudyb
0
105
Member Avatar for Hawkpath

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 …

Member Avatar for mrnutty
0
188
Member Avatar for CodyOebel

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 …

Member Avatar for CodyOebel
0
116
Member Avatar for ckjie

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, …

Member Avatar for Salem
0
162
Member Avatar for DARK_BYTE

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) { …

Member Avatar for DARK_BYTE
0
126
Member Avatar for Excizted

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 …

Member Avatar for Excizted
0
121
Member Avatar for gaurav10

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; …

Member Avatar for gaurav10
0
120
Member Avatar for iamcreasy

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, …

Member Avatar for iamcreasy
0
214
Member Avatar for aLLtIMElOW

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 …

Member Avatar for Salem
-2
144
Member Avatar for re41verse

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 …

Member Avatar for Excizted
0
76
Member Avatar for lich004

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 …

Member Avatar for Nick Evan
0
684
Member Avatar for empror9

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 …

Member Avatar for Excizted
0
142
Member Avatar for MyRedz

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??

Member Avatar for tetron
0
194
Member Avatar for sssouljah

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 …

Member Avatar for jonsca
0
136
Member Avatar for ojung

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!!!??

Member Avatar for onksssss
0
10K

The End.