51,593 Topics

Member Avatar for
Member Avatar for snag49ers

I need to scan a directory and get the files located in it, which is not a problem, but I also need to know if the directory contains folders because I also need to open the folder and get the files in those directories. I put this code together and …

Member Avatar for snag49ers
0
98
Member Avatar for sara9111

[COLOR="Red"][B]How i solve this problem ?? i try, but i don't know wts the wrong??[/B][/COLOR] A.Write the defintion of function one so that it returns the sum of x and y if x greater than y, it sholud return x mines 2 times y. B.Write the defintion of function two …

Member Avatar for jesseb07
0
122
Member Avatar for sacsmia

Hi... I'm using microsoft visual studio 2005. I'm trying to trick out my code for a college assignment and I'm stuck trying to add a feature to play a .wma sound at certain parts. My program is "Hot drink vending machine" so I'm trying to add sounds where the user …

Member Avatar for mrnutty
0
239
Member Avatar for Aseem_Pandey

This is from code chef. ( easy level, poker) The program runs correctly for all the sample input I have tried. However the chef told me it's wrong. Can someone please help me? Can it be wrong because I have used getchar() in the main() ?? I have used it …

Member Avatar for Aseem_Pandey
0
135
Member Avatar for jen140

Hello all. I want to show a boolean value with MessageBox. But it only accepts strings. I'm currently looking throught win32 sdk but cant find any function to convert a bool to a string(something like .Tostring in c#). Any help ?

Member Avatar for jen140
0
249
Member Avatar for skiing

I am having problems with the case of removing the node after it has been placed in the correct position in the tree where now I have the same value in two places please help me this is my code. Or is my revision correct. bool Delete_Node(node_ptr &p, keytype Target) …

0
51
Member Avatar for jen140

Hello all. As always i have another problem with my Visual Studio 2008 Professional edition. I am running it on windows vista ultimate x64 edition. And i couldnt get my apps made here to work under any other xp machine (x32). I have created an empty c++ project ( Framework …

Member Avatar for jen140
0
182
Member Avatar for tesid2k8

Hye I want to store my teachers name, course name in file. But the names can also include spaces... using getline() func I can store the string with spaces in to file... But while reading I want that instead of considering space as an indication of new string... there shd …

Member Avatar for mrnutty
0
113
Member Avatar for marceta

Hi everyone. I heard that it is possible to code up a small program to randomly change windows desktop bg pic. I havent got any code (as i dont know how to do it) so could some plz tell me, or direct me to a site or something. Btw this …

Member Avatar for marco93
1
587
Member Avatar for XodoX

Hello, I need to do the following problem, but I totally don't get it. [code] Operators Overloading The purpose of this lab assignment is for you to write a class called Character that provides a character functionality including possible operators support. The class must support the following operators: 1. from …

Member Avatar for mrnutty
0
92
Member Avatar for renovat0

I need to do 2x2 array calculation.but not using global variable. enterData() calculate() displayResult() this are the three function. but i can't pass the value.. please help me.. I've done it without using function.. #include <iostream> using namespace std; calculate(int x[][],int y[][]); enterData() { int x[2][2]; int y[2][2]; int t[2][2]; …

Member Avatar for jesseb07
0
97
Member Avatar for himgar

[code] #include <iostream.h> #include <conio.h> int main() { cout<<"hello"; textcolor(2); cprintf("hello"); return 0; } [/code] Errors i am getting : call to undefined function 'textcolor' in function main call to undefined function 'cprintf' in function main I am using Turbo c++ 4.5 Windows XP SP2 Also graphics.h header file is …

Member Avatar for necrolin
0
104
Member Avatar for seakayaker

I am trying to get the text from a text window. However, the GetWindowText() call keeps on getting me the text in the window header and not the text in the window itself... I have read up on the function call and seen that this happens if you call it …

Member Avatar for seakayaker
0
521
Member Avatar for k007

I need to write a template for binary search routine so that it works with arrays of various types (int, char, c style strings). Here is how I have it written,it seems to work when I have a interger array but fails on chars. I need help fixing this. Binary …

Member Avatar for k007
0
154
Member Avatar for auto9817

Hi everyone!! I have a scientific C++ program which requires a good speed to run.(the program runs a lot of matrix and vector operations) For doing that, I come across following options on the net: 1. Use of turbo C++ 2. Use of Linux instead of window XP My current …

Member Avatar for Salem
0
159
Member Avatar for renovat0

#include <iostream> using namespace std; int main () { int R,G,Y; int r,g,y; int a; cout<<"enter your input"<<endl; cin>>a; if (a==R||r) { cout<<"please stop"<<endl; } else if (a==G||g) { cout<<"you can go"<<endl; } else if (a==Y||y) { cout<<"prepare to stop"<<endl; } else cout<<"Out of range"<<endl; return 0; }

Member Avatar for renovat0
0
110
Member Avatar for NeoFryBoy

Quick background: I'm working on Project Euler and made a palindrome checker. I needed to convert integers to strings. itoa() kept giving random values (9 gave 9 or 90, etc...), so I decided to make my own, and ran into a problem. [I]I have fixed it, but could somebody explain …

Member Avatar for NeoFryBoy
1
132
Member Avatar for slacke

I have lots of Drytek > Vigor 2700,2800 routers on the public net. I manage this networks and since this type of routers has Log support I write an application on my linux box to collect those logs. The routers are sending UDP datagrams to a configurable address and port. …

Member Avatar for slacke
0
211
Member Avatar for agaba

When i rebuild the program , I get this error 1>c:\users\agaba\documents\visual studio 2005\projects\car\car\school.cpp(97) : error C2447: '{' : missing function header (old-style formal list?) 1>Build log was saved at "file://c:\Users\agaba\Documents\Visual Studio 2005\Projects\car\car\Debug\BuildLog.htm" 1>car - 1 error(s), 0 warning(s) The code .................. [code=cplusplus] // Short-term parking at the airport, from 4am …

Member Avatar for agaba
0
115
Member Avatar for agaba

When i try to rebuild this what i m geting 1>------ Rebuild All started: Project: depreciationarry, Configuration: Debug Win32 ------ 1>Deleting intermediate and output files for project 'depreciationarry', configuration 'Debug|Win32' 1>Compiling... 1>arry.cpp 1>Compiling manifest to resources... 1>Linking... 1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup 1>C:\Users\agaba\Documents\Visual …

Member Avatar for agaba
0
282
Member Avatar for WoBinator

Hi, im new to programming. I have read alot of posts on this site and am wondering if i need to learn C before i learn C++. Is learning a language before C essential? or will i just get the hang of it. This is my second post, asking about …

Member Avatar for Zacadx15
0
504
Member Avatar for liveonfire

I was just wondering what the best way to deal with command line arguments is? Should I just use some different function, should I embed all the checking into main(), should I create a class that deals with them or is there another option I haven't thought of? I know …

Member Avatar for liveonfire
0
81
Member Avatar for Hawkpath

In a rubiks cube solving program I'm writing, i wanna make it so if the space is red, then a red "R" appears. I don't know how to do this with out changing the color of all the text on the screen. I use: [CODE]system("Color XX");[/CODE]

Member Avatar for Hawkpath
0
109
Member Avatar for zimis

Hello, I'm trying to make client program which connects to server, and comunicates with it for unlimited time. SOCK_STREAM (TCP). Is there a way to change the way of getting server messages? Now it's just infinite loop. (I think thats not good, and requires a lot of CPU cycles) [CODE=c] …

Member Avatar for Salem
0
309
Member Avatar for gopi17

can somebody help me with this....i'm creating a 4X4 sudoku program...with 8 auto-generating numbers and 8 user inputs...i used the random number function rand() but the numbers keep on repeating...the problem is i'm not allowed to use arrays... [CODE] int main() { int row1col1,row1col3,row2col2,row2col4,row3col1,row3col3,row4col2,row4col4; int row1col2 = 0; int row1col4 …

Member Avatar for wildgoose
0
222
Member Avatar for sara khan

[B][U]PROBLEM 4 - WATER TANKS[/U][/B] There are n identical large cylindrical tanks for storing water. The tanks are arranged in a circle on level ground. Each tank is connected with its two neighbours by means of pipes situated at its base. There is a valve between each adjacent pair of …

Member Avatar for sara khan
0
206
Member Avatar for Hawkpath

The name says it all. I am looking for beginner c++ programmers to create a simple console based application. The application I had in mind would be a rubik's cube solving program. I have already started on it. If you are an experienced programmer and would like to help out …

Member Avatar for Hawkpath
-1
104
Member Avatar for Nathan Campos

Hello, I'm trying to get a string from a thing that is inside quotes as you can see [URL="http://www.daniweb.com/forums/thread209962.html"]here[/URL], but when i try to compile i got this errors: [code]ubuntu@eeepc:~/C++/Tree$ g++ -o tree tree.cpp tree.cpp: In function ‘int main(int, char**)’: tree.cpp:65: error: ‘get’ was not declared in this scope tree.cpp:65: …

Member Avatar for Nathan Campos
0
1K
Member Avatar for Nathan Campos

Hello, I'm learning C++ and all that i learn i try to put in a interpreter of a language that i'm developing, it's only to practice, but here is a thing that i don't learned already, that is how i can get a string that is inside quotes, because i …

Member Avatar for Nathan Campos
0
3K
Member Avatar for aliaks

hey guys, I have this [CODE]RiddleGenerator::QnA RiddleGenerator::mQnA[RiddleGenerator::QuestionCount] = { { "What shape as 4 sides?\n\t1)Triangle\n\t2)Circle\n\t3)Square", 3 }, { "What is the capital of England?\n\t1)Paris\n\t2)London\n\t3)Washington", 2 } // NEW QUESTIONs CAN GO IN THE ABOVE SPACE <---! };[/CODE] and have looked on the net but cant find anything helpful so here …

Member Avatar for VernonDozier
0
166
Member Avatar for slayerace180

ok, so here is a link to my project guidelines... [url]http://www.santarosa.edu/~ssarkar/cs10sm09/cis10/proj5.html[/url] by the way, the deadline was extended to 08/07/09 and here is my code for my program... it compiles and counts perfectly, but for my project i need the program to go from generation 1 to generation 2 to …

Member Avatar for Nathan Campos
0
162
Member Avatar for yara naser

hi im write this code with no error but in run it doesnt give me the best result i dont know why please if you can help me soon because i must recive this home work suuday not the block file have any statement in c++ and tokens-result are empty …

Member Avatar for Salem
0
215
Member Avatar for gretty

Hello I have a function that takes in an array as a parameter & puts random numbers into the array. I will run this function over 10 times during the program & I want each time I run the program for a different set of numbers to be in the …

Member Avatar for Dave Sinkula
0
156
Member Avatar for esesili

Hello All, I am a new user of c++. Until now I just worked on basic console applications. I have to develop a program which will be able read two images and open them in separate windows and do some geometric calculations background. Also this program should allow user to …

Member Avatar for marco93
0
115
Member Avatar for rakeshthp

hello, I dont know actually in which category this problem fits into.. i assumed this is the correct place.. If not then pls guide me as where to post it.. I have set of points which are connected with a line... This connected line may or may not be straight.. …

0
51
Member Avatar for agaba

When my try to rebuild my program i m getting this errors 1>Linking... 1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup 1>C:\Users\agaba\Documents\Visual Studio 2005\Projects\car\Debug\car.exe : fatal error LNK1120: 1 unresolved externals 1>Build log was saved at "file://c:\Users\agaba\Documents\Visual Studio 2005\Projects\car\car\Debug\BuildLog.htm" 1>car - 2 error(s), 0 warning(s) my …

Member Avatar for John A
0
147
Member Avatar for spauka

Hi all, I am a writing a small plugin to a piece of software that allows people to parse python files and return the output to the program, and to do that, i am allowing users to enter their script. However, they can only enter into a single line text …

Member Avatar for spauka
0
115
Member Avatar for mandofl

Hello. What im tryin to do is answer the following. Write a class named Car that has the following member variables: yearModel, make, speed. In addition the class should have the following constructor and the other member functions constructor-accept the cars year model make as arguments. an assign to the …

Member Avatar for necrolin
0
3K
Member Avatar for dgr231

Hello all, I am in the process of teaching myself c++. I wrote one program successfully and I'm trying to write my second. I have run into a problem that I can not seem to figure out at all. I understand that this seems trivial, but I really need to …

Member Avatar for dgr231
1
157
Member Avatar for xfngrn13

hi, could anybody help me correct my code. . .because i tried debugging it so many times i just cant find the problem so i was supposed to find for the number that occurred the most and times it occurred in my program Thanks for your help in advance ^^ …

Member Avatar for VernonDozier
0
126
Member Avatar for seakayaker

Hi, I have created a simple dialog application in which I have a button and a status window. I have managed to properly display status messages to this status window using sendmessage when the user hits the button. However, there seem to be a timing issue when I try to …

Member Avatar for seakayaker
0
124
Member Avatar for JackDurden

How do you erase an element thats inside a map. Not the key but the element the key is pointing to? This doesnt seem to be doing what i want it to. [CODE]map<int, vector<int> > my_map; map<int, vector<int> >::iterator it; void erase(int num) { for(map::iterator item=my_map.begin();item != my_map.end()) { if(it …

Member Avatar for jesseb07
0
151
Member Avatar for goody11

Hey, I'm trying to load a bunch of words and setting them as my text but I they aren't setting for some reason. Here is the code: [code] #include "windows.h" #include "resource.h" #include <fstream> #include <vector> #include <cstring> #include <new> using namespace std; HWND hwndGoto = NULL; HWND hwndGoto2 = …

Member Avatar for Ancient Dragon
0
105
Member Avatar for slayerace180

ok, so ive rattled my brain for quite some time now and im tired, i need help on my program because as of now, im down to 2 debugging errors "YAY!"... here is what the debugger says... " Line 7: error: too few arguments to function `void nextArray(bool (*)[20])' Line …

Member Avatar for slayerace180
0
105
Member Avatar for Nathan Campos

Hello, I'm learning C++ and i want to know how i can build a program that play videos, don't take care of types, any type of video, not all, but one, remember that iwant to build a command-line app and i'm using Linux. Thanks, Nathan Paulino Campos

Member Avatar for Nathan Campos
0
66
Member Avatar for medopunsher

Hi all , I need help with editing registry i want to put my program at startup So in this case it wil be at (Hkey Local Machine \ Software \ Microsoft \ Windows \ Current Version \ run \ "; so i need to add a new key with …

Member Avatar for Ancient Dragon
0
61
Member Avatar for tarakant_sethy

Hi Guys, is there any other way to use shared library in unix and linux platform apart from dlopen() and dlsym(). Thanks.

Member Avatar for tarakant_sethy
0
83
Member Avatar for Leila1

Please C++ TO Delphi [CODE]IMAGE_NT_HEADERS* inh; IMAGE_SECTION_HEADER* ish; DWORD newRVA = (ish + inh->FileHeader.NumberOfSections - 1)->VirtualAddress + ((ish + inh->FileHeader.NumberOfSections - 1)->Misc.VirtualSize + (inh->OptionalHeader.SectionAlignment - (((ish + inh->FileHeader.NumberOfSections - 1)->Misc.VirtualSize % inh->OptionalHeader.SectionAlignment) ? ((ish + inh->FileHeader.NumberOfSections - 1)->Misc.VirtualSize % inh->OptionalHeader.SectionAlignment) : inh->OptionalHeader.SectionAlignment))); newSecSize = (newSecSize + (inh->OptionalHeader.FileAlignment - ((newSecSize % …

Member Avatar for Salem
-1
147
Member Avatar for dgr231

Hey all, I know this is a very newbish questions, but I couldn't readily find the answer on this board so I figured I would ask. Consider the following code snippet: [code=cplusplus] for(i=0;i<5;i++) { int number; int counter; cout << "Enter a number less than 10:" << endl; cin >> …

Member Avatar for Salem
0
133
Member Avatar for yara naser

[B]iam write this programe put in run there is problem in pointer please can you help me. to find the place of the problem when you run it press f10[B][/B] [CODE]#include<iostream> #include<fstream> #include<string> #include<conio.h> #include <iomanip> //#include<stdio> //#include<ctype> using namespace std; /**************************************************************** Functions prototype. *****************************************************************/ void Open_File(); void Demage_Lexeme(); int …

Member Avatar for Ancient Dragon
0
152

The End.