49,757 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
95
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
119
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
234
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
132
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
240
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
50
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
179
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
110
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
580
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
89
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
94
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
101
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
511
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
151
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
155
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
106
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
131
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
208
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
113
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
279
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
476
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
79
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
106
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
281
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
217
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
201
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
103
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
164

The End.