49,761 Topics

Member Avatar for
Member Avatar for stevanity

I came across this qn in a debugging contest in college. The out put must be "aadd" WHat should be given in conditional field. NO goto and exit statements. [IMG]http://lulzimg.com/i13/b449cb.jpg[/IMG] Can anyone help me??

Member Avatar for L7Sqr
0
99
Member Avatar for daviddoria

I am trying to return a vector of some of the elements in a vector. I wish to modify one of the elements in this new vector and have it automatically update the value in the original vector. I tried this: [code] #include <iostream> #include <vector> class TestClass { public: …

Member Avatar for daviddoria
0
149
Member Avatar for C++ newb

Ok, I want this program to email information for the first two text boxes and have no idea how. Also when I tryed to search it, it came up with a LOT of code that I didn't even know what meant. Any ways to do this without much hassle? Also …

Member Avatar for jonsca
0
94
Member Avatar for whit0851

Hello every one I'm trying to write a game that has a person guess a number between 1 and 100 hand have the computer guess that number via inputs from the user but I keep running into snags. [CODE]#include <iostream> #include <cmath> #include <cstdlib> using namespace std; int main() { …

Member Avatar for Crutoy
0
756
Member Avatar for Crutoy

Hi , i'm trying to do an exercise where the computer has to guess the random number from the range of 1-1000. Currently this is the way i have it set up as. I divide that range in half and store it in guess and then check it against the …

Member Avatar for Crutoy
0
799
Member Avatar for jmace

I'm working on a program in visual c++ that I need some help on. I'm new to c++ and I can't seem to figure out how to do a http POST. The program gets a username and password from a form, and then it's supposed to send the username and …

Member Avatar for jmace
0
226
Member Avatar for sdr001

I am trying to run html code inside of a cgi script. Everything works expect for the line of code below. It says I have a syntax error and I do not know why this is. [CODE] << "<input class = 'btn' name = 'calculate' type = 'button' VALUE='Shortest Path' …

Member Avatar for Fbody
0
165
Member Avatar for SourabhT

Hi, I am trying to implement abstract factory in c++, but i encountered one problem that compiler doesn't allows me to this: class Temp { virtual void dr=0; //error is in this line }; it says illegal use of type void !! i can use other return types but i …

Member Avatar for Agni
0
140
Member Avatar for sdr001

Hello, I am trying to save elements into a file and it is not working. If the file is there, the new elements need to override everything in the file, pretty much clear it out and write to the file. If the file is not there, it just writes the …

Member Avatar for sdr001
0
217
Member Avatar for FriXionX

Hi guys, first post here. I decided to come here because it looks really friendly. Ive looked around on the internet, but I dont really understand how to do this. Take note that I am just beginning in c++. (Few days practice), so i decided to try to make a …

Member Avatar for Kanoisa
0
243
Member Avatar for sdr001

Hello, I am having a problem with reading input from my web app. The data is being sent by JavaScript and I am using getline() to get the data. My problem is when I run it, I get an infinite loop. I do not know why this is happening. A …

Member Avatar for sdr001
0
110
Member Avatar for lexusdominus

Im trying to learn how to use the winapi - ive read tutorials about message handling and the windows procedure ect, but am a bit lost as to where to start. I know what i want to do - my program launches as a console and starts a new thread …

Member Avatar for Ancient Dragon
0
155
Member Avatar for spoonlicker

Because I honestly feel like I'll never understand them(it's been years by the way). So I just want to know if it's possible to make any program you fully desire with out pointers or any other complex OOP such as encapsulation and typedefs. I just can't work with that logic. …

Member Avatar for katokato
-1
689
Member Avatar for dolly_olaide

Hi. I am trying to implement adding then subtracting images but I can't seem to get it right. My thoughts are to load the image. add the pixel values. Firstly, I can get the pixel location but I DON'T KNOW HOW TO DISPLAY THE PIXEL VALUES from the pixel location. …

0
103
Member Avatar for Ricky65

Hi I'm attempting to code a proxy in C++ using Winsock2. At the moment it only works on simple HTML pages and locks up a lot when downloading certain pages. After a lot of fiddling, I'm not sure what the problem is. A big thank you to anybody who can …

Member Avatar for Ricky65
0
1K
Member Avatar for Kontained

I'm in the process of writing a knights tour algorithm for a homework. I believe my algorithm is a good one and don't see anything wrong with it, but for some reason my program keeps throwing a stack overflow error. I don't see any reason why it would be throwing …

Member Avatar for Kontained
0
610
Member Avatar for super-duper

I need help with this problem, here. I have 2 functions: "find4update" is supposed to compare the incoming parameter "item2" to the item that is already in the linked list, and return the value of "found". And my second function "deletNode" should use that "find4update" function and delete the found …

Member Avatar for Narue
0
92
Member Avatar for ontherocks

The concerned question is: If there are a bunch of unique items, which one (vector or set) wold be more efficient to search for a particular item by value and why? As I understand vector is more efficient (because of contiguous memory) to search by position index. But in this …

Member Avatar for Narue
0
168
Member Avatar for Niine

Hey guys, i hope you can help me, i have a problem. I found in the net a code for taking a screenshot. the code works well, but the quality of the outputet bmp file is not good. I have not enough skill to find the place where i can …

Member Avatar for Niine
0
223
Member Avatar for cbreeze

Hello, I am working on a program for my operating systems class dealing with catching signals and exit status's. The long and short of the assignment is to have a parent create a child and then wait for the child to die. When the child dies the parent should capture …

Member Avatar for L7Sqr
0
240
Member Avatar for jainpratik2

Hi Folks, I need help to generate keystrokes in my existing application in LINUX environment. I am fully aware that there are libraries in Dev C++ which do exactly what I want but in Windows and I need something like that in Linux. I have googled a lot, but could …

Member Avatar for L7Sqr
0
4K
Member Avatar for writerervin

i'm doing a rpg for fun but this one function is giving me problems. it compiles without problems, but when i test it, the hp stats done change. this is the code for the function. [CODE=c]void attack(dragon *d1, dragon *d2) { if(d1->getdef() < d2->getatk()) { d1->changehp(- ( d2->getatk() - d1->getdef() …

Member Avatar for writerervin
0
463
Member Avatar for Mr.UNOwen

Hello, I'm trying to use wxWidgets to get mouse, keyboard and joystick events without creating a window context as I'm using GLUT for that. Can it be done and if so how? All the examples I see have the events tied to some sort of visual context.

Member Avatar for Mr.UNOwen
0
185
Member Avatar for FrancisLazo

I am currently working on a project called movie reservation and I am almost done, the only problem right now is the seats. I have no idea how I can display 200 seats and identify whether a seat is already taken or not. Also, each row must be referred as …

Member Avatar for FrancisLazo
0
3K
Member Avatar for geekme

Kindly help me with the implementation of AVL tree rotation and balance factor determination.Insertion and deletion is done using recursion.No issues with that. Regards.

Member Avatar for Nick Evan
0
54
Member Avatar for edrag

i keep getting this error: [icode] error: expected ‘)’ before ‘,’ token[/icode] this is the code i'm using: [code=c] dragon(string str = "wild dragon", int level = 5);[/code] this is inside a the dragon class definition. [code=c]dragon::dragon(str,level) { name = str; tp = ((rand() % 6) + 1); type = …

Member Avatar for writerervin
0
1K
Member Avatar for watery87

Hi all, I have some problems with my program, as it always compiles with segmentation fault after it run finishes. ANy help is appreciated [code] Program received signal SIGSEGV, Segmentation fault. 0x00375d37 in ?? () from /lib/tls/i686/cmov/libc.so.6 (gdb) bt #0 0x00375d37 in ?? () from /lib/tls/i686/cmov/libc.so.6 #1 0x0804992b in Chord::isValid(char*) …

Member Avatar for mike_2000_17
0
161
Member Avatar for reemhatim

I'm doing a function that returns the index of the largest integer in the array it's an easy function.I've done it but I don't know why the output is always 10 although i want to return only the index of the largest number and here is my code: int MAX_INT(int …

Member Avatar for reemhatim
0
142
Member Avatar for Jutch

I am having trouble figuring out a start off point for this project. Can anyone help me get started? I would really really appreciate it. I'll post the code and instructions below. Bluebird Airlines needs a program to assign boarding passes on its only plane which has a seating capacity …

Member Avatar for Ancient Dragon
0
425
Member Avatar for fat_flying_pigs

This is a fairly easy homework, but I am new to c++ and would like some help. (to my teacher, if you happen to read this, I'm not trying to cheat, but get help to better understand the concepts in this assignment.) An overview: [INDENT]"Read an unordered collection of calendar …

Member Avatar for pseudorandom21
0
154

The End.