43,549 Solved Topics
Remove Filter ![]() | |
a mouse is trapped in a labyrinth.. and he has to find the cheese! the input is W and H (height and width), and a graph like this one: [CODE] ##...# C###.. ...... .####. .....M [/CODE] i'm supposed to calculate the shortest amount of steps he needs to make to … | |
Hey guys, I come over from C, wanting to learn C++. I have a nice little book but figured I could use a project to get me going. So I magicly crafted code, and ran into this problem: [icode]C:\Code\Rapture\World.h|7|error: ISO C++ forbids declaration of `Breeture' with no type|[/icode] With this … Software Development c++ | |
I am using this function to download files: [code=python]def download(url): urllib.urlretrieve(url, url.split("/")[-1])[/code] I am downloading files from a site, but I don't know the EXACT filename... All I know is the id for them... Example: download("http://site.com/files/489411/") When i am to do that, it automatically resolves the appropriate filename and it … Software Development python | |
Menu.RC [CODE]POPUP "File" } MENUITEM "New", CM_NEW MENUITEM SEPERATOR MENUITEM "Save", CM_SAVE MENUITEM "Save As", CM_SAVEAS MENUITEM SEPERATOR MENUITEM "Exit", CM_EXIT { }[/CODE] I have another file with the definitions to CM_NEW, Etc. Software Development c++ | |
hi all, i've a problem in converting struct into short here's the code i'm using, but it's still error while i'm running it. [CODE] typedef struct ip_header; unsigned short *temp; memcpy(temp, &ip_header, sizeof(ip_header)); [/CODE] any help will be greatly appreciated. thx. Software Development c | |
I have a template function as follows: template <typename T> int my_func(T& arg) T is expected to be of type map<T1, T2>. T1 is expected to be of a basic type (int, long, etc.) and T2 is expected to be of type vector<T1>/list<T1>/etc. I want to iterate over the contents … Software Development c++ | |
Hi python guys, I just started to dig in Python. I am new to this. I came close to Python when I got a project to be done with Django. I got stuck when I was fetching data from database(mysql). the data was fetched in variable 'rows' which have Id, … Software Development python python-django | |
I am following some exercises in Delphi in a Nutshell from Ray Lischner. Very easy to follow and readable. He was explaining how units are working the following code: [code=pascal] program Units1_1; uses UnitA; {$AppType Console} begin WriteLn('Units 1_1 main program'); end. unit UnitA; interface uses UnitB; implementation initialisation WriteLn('UnitA … | |
hello all i dont know what is the problem ....... a very simple change in the order of functions make the program goes in infinite loop this code works will [CODE=cpp]#include <iostream> using namespace std; int main() { int i; while(true) { cout << "\nEnter Intger:"; cin >> i; if … Software Development c++ | |
If I declare a struct node, is the following legal in C++? [icode]node nodes_array[vector.size()];[/icode] I know this is not legal in C. However, my C++ compiler does not complain. Is this only in recent versions of C++, or has this always been legal in C++? | |
hello all i want to know the proplem with this program and first ........ can i write a string object to a file normally like other objects ?? this is the code ......the program writes the file but it can't read it again [CODE=cpp] #include <iostream> #include <fstream> #include <string> … | |
Greetings! I was given a task yesterday to constuct a table like this: 5 4 3 2 1 4 5 4 3 2 3 4 5 4 3 2 3 4 5 4 1 2 3 4 5 using loops and only loops. I've been trying to solve this for … Software Development java | |
I am currently experimenting with function pointers as part of a larger project. Drawing from both online sources and textbooks. The problem however is that after storing the values as an array, when i call them the functions either fail to be called, or if i attempt to print the … Software Development c | |
Hi, everybody! I am new to this forum. I have a problem with an oriented weighted graph, more precisely, I have to find the shortest path between 2 nodes, but this path should pass through a given intermediary node. For example, I have a graph with 5 nodes, namely A, … Software Development algorithm | |
Hi all, I am generating a report in flexgrid. I need to copy this data in excel and attach the excel sheet in the outlook so that the mail can be send. Outlook will be opened on a button click. I am able to open the outlook but unable to … Software Development visual-basic | |
I'm still grappling with the concept of passing parameters and returning responses. See code below: [CODE]#Measurement Converter # Converts Common Chinese Units of Measurements (Practicing function return) # Convert "cun" to "inches" def cun_to_inches(cuntoinchesQ): cuntoinchesUR = None while cuntoinchesUR == None: cuntoinchesUR = float(raw_input(cuntoinchesQ)) cuntoinchesUR *= 1.31 return cuntoinchesUR # … Software Development python | |
I wan to read from multiple files and write into 1 file....the fuse_cortex_header_r function will read a file and then break the file into several file which only consist of classes...for fuse_cortex_header_w file, i would like to read all the files which have been writen by previous function and write … Software Development c++ file-system ios | |
Hi, How do i select a particular value of a combobox? Example [code] combo1.selectvalue(rset.field("id"))[/code] I believe you understand what i mean. I bring data from database and want select it in combo. Thanks Software Development visual-basic | |
Hi can anyone help me, I am learning the language C but need some help writting some code. what i need to do is from the input of the keyboard i need to find the max and min of some values and out put them. what i got so far … Software Development c | |
I have 2 loops like below. In the second loop I am searching a string if I can find the "*" character. This loop will loop 100 times but what I am wondering is that if you wont find the character "*" in the string str, is is possible to … Software Development c++ | |
Hi All Anyway of compressing a gzip file down evern further. I have a file which is already compressed by gzip but is till to big to email. Any ideas how to make it even smaller??? Software Development shell-scripting | |
I have declared a map like below. What I have some problem with is how it is possible to set the double Number1 to have the value of "Numb". I am not really sure I have understand how the mapping works here. [code] std::map<std::string, double> numb; void Test() { double … Software Development c++ | |
I have a function which takes an array of SDL_Rect (which is a data structure containing four integers, x, y, h and w), and assigns values to the data members. However, when I try to compile, each line generates the error "error C2059: syntax error : '='". [CODE] int main() … Software Development c++ data-structure | |
I am trying to implement the composite "structural pattern". The attached code compiles but when I run the exe file the memory collapses. Here is the code: [code] #include <iostream> #include <iomanip> class CTreeComponent { public: virtual void traverse(int)=0; }; class CTreeLeaf:public CTreeComponent { public: CTreeLeaf(int wert):m_wert(wert){} void traverse(int tiefe){std::cout<<m_wert<<" … Software Development c++ | |
Hey dudes...i am currently working for a company that codes in delphi 7... i am familliar with C# language but not that much of Pascal language...i need to make a form where i can print an added HTML page... I managed to get it to print a form but i … | |
hi i have 3 form and an exit button in 3rd form i want to close the whole project when i click exit i think unload me can only stops that particular form i want to close the whole project thank u very much Software Development visual-basic | |
Hi I am trying to learn c++ by using it where I can at work. Usually I can muddle through by searching forums and although I might not end up with an elegant piece of code, my programs seem to work ;) What I am trying to do, is open … Software Development c++ file-system ios | |
I would like to collapse whitespace in a string of the followinf foramat using a some pre defined functionalities. XXXXX<space>-<space>XXXX shoud be converted to XXXXX-XXXXX XXXXX<space>-XXXXX shoud be converted to XXXXX-XXXXX Please help Software Development python | |
Hai all, in my appliction Im writing functionality to find keywords entered by user if keyword found i need to return the 10 words before keyword and 10 words after keywords, Im able to find the keywords using Instr method.. Im not getting how to get 10 words Before and … Software Development vb.net | |
Hi guys :) I'm working on a project ( a game ) this is the code [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; //####### Begin Class Node ########### class Node { public: string data; Node* link; Node(string x) { data = x; link = NULL; } }; //####### … Software Development c++ file-system | |
Hi Guys This has been going on for a while but now I have finally decided to do something about it. A few weeks ago I compiled a small C program from a book I was reading. It compiled fine but I wanted to make a slight change to the … Software Development c | |
Hi, i'm new to C programming and i could use some help with an assignment. i would like to store a word in a linked list, with each letter of the word in a separate node of the linked list. i would then like to traverse the linked list to … Software Development c linked-list | |
Hi to all, I want to create an application containing a lot of fields, my problem is the client want to maintain the records of payment and the date. I have created database containing only one tables. How can I handle this kind of database management, the goal is, if … Software Development microsoft-access vb.net visual-studio | |
I have seen that I can use a variable as the specification for the dimension of a one-dimensional array to be allocated by the "new" keyword. The book I'm reading explains that this can be extended to two or more dimensions but with a restriction, only the left-most dimension can … Software Development c++ | |
I have a problem guys. It's due to duck typing. Now I expected to run into something like this sooner or later, but I can't help but feel there's a better solution. [code=Python]import re def patternMatching(pattern, string): matchList = re.findall(pattern, string) print '\n'.join(['%s' % v for v in matchList]) [/code] … Software Development python | |
hi friends! i was searching for a base conversion script in python when i was stumped with the following code snippet [code language=python] >>> number = 1000 >>> hex2bin = {"0":"0000", "1":"0001", "2":"0010", "3":"0011", "4":"0100", "5":"0101", "6":"0110", "7":"0111", "8":"1000", "9":"1001", "A":"1010", "B":"1011", "C":"1100", "D":"1101", "E":"1110", "F":"1111"} >>> "".join([hex2bin[h] for h … Software Development python | |
Hi guys :) Thanks first for the help, yesterday.. I really did well in my exam :), thanks a lot again :) Well, I guess I need a little bit help in this I have a file, and I want the whole paragraph in the file to be inserted in … Software Development c++ file-system | |
Im writing a code and included many library files (.lib) with it , when i compile all is fine 0 errors and 0 warnings , but when i built i got problems. when using VC 6.0 i got this warning [CODE]LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of … Software Development c++ | |
Hi all , I have a program I have written for a question , but it has one problem I dont seem to be able to solve , the last part has to calculate the average hours spent on each module , yet it keeps coming up with answers I … Software Development c++ | |
Greetings, I'm trying to write a function which gets two pointers as parameters. The first one "points" to the start of the first linked list, the second one is currently on null, but it will later serve as a pointer to the start of another linked list. The function is … Software Development c++ linked-list | |
![]() | Hi =) I am very new to c++ and have started messing around with some lines of code, but I am totaly stuck on this one: [CODE] #include <iostream> #include <string> #include <sstream> using namespace std; int main() { int antnames; cout << "How many names do you want to … Software Development c++ |
The program i am working on currently need to read a file and write into multiple files. Basically i am supposed to separate all the classes in tat file so i actually added an comment line to the file, i extract the classes according to the comments. Now i would … | |
I have some number: [code] int i = 43; [/code] I need to divide this number in to two digits. For example - 43, to get a 4 and 3. Help me pls) Software Development c++ | |
Hi, is there a data type larger than unsigned long long int except double? I don't want double or float because I need to keep it as precise as possible. I also need it to be able to do modulus. How would I do this? Software Development c++ | |
Hi, I am making a simple screen shot program. I need to be able to capture the entire screen, or if possible, a region of the screen (like a rectangle from point (25, 60) to (300, 456)). I also need to be able to save it to a bitmap file. … Software Development c++ | |
Hi all. A while back I'd posted regarding a do-while routine, using switch. It appears that my main is working, and my switch.... it just keeps looping around my main menu. I'm not entirely clear on why either. Here is the code. (One responder to a previous post told me … Software Development c++ | |
I wonder if it is possible to call the function void OneFunction() inside the buttoncontrol. [code] namespace Test1 [COLOR="Green"]{[/COLOR] public ref class Form1 : public System::Windows::Forms::Form [COLOR="green"]{[/COLOR] private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { // Is it possible to Execute/Call OneFunction() here ? } [COLOR="green"] }; }[/COLOR] void OneFunction() { … Software Development c++ | |
The task: Write a program that asks the user for a file and counts the number of characters, words, and lines in that file. Then the program asks for the name of the next file. When the user enters a file that doesn't exists, the program prints the total count … Software Development file-system java | |
Hi, I have a form with two tabs. On each tab, I have 5 different fields. Is it possible to design the elements in a frame and assign them to a tabstrip, or do I have to load and place them in the new loaded tab? I would appreciate your … Software Development visual-basic | |
Hi everyone this is my first post on these forums and I hope that someone can clear up a simple question for me...Right now I am reading Ivor Horton's Beginning Visual c++ 2008 and in chapter four he gives an example program for finding prime numbers using pointers and a … |
The End.