51,593 Topics
![]() | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 ? | |
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) … | |
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 … | |
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 … | |
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 … | |
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 … | |
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]; … | |
[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 … | |
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 … | |
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 … | |
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 … | |
#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; } | |
![]() | 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 … ![]() |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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] | |
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] … | |
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 … | |
[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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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.. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 ^^ … | |
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 … | |
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 … | |
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 = … | |
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 … | |
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 | |
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 … | |
Hi Guys, is there any other way to use shared library in unix and linux platform apart from dlopen() and dlsym(). Thanks. | |
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 % … | |
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 >> … | |
[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 … |
The End.