64,152 Solved Topics
Remove Filter ![]() | |
What do you think is better for making applications? I like QT API verry much, but I dont know how compatible is with a system . I dont like VC++ because I can only use it on windows. Please help me to decide.. What do you think? | |
I want to create several files at once containing the same data. Is this possible? I tried using a variable in the file pointer and file name: [CODE] int tel; for (tel = 0; tel < 200; tel++) { FILE *bestand_patienten[tel] = fopen("patienten/patientent[tel].txt", "w"); fprintf (bestand_patienten[tel], "hallo"); } [/CODE] Didn't … | |
hi everybody, I've got some troubles in C and i need your help In C: (test.c) Suppose i include <unistd.h> and i call function "open" ==>> it run OK In C++: (test.cpp) I'm using a framework (e.g. RTM) which is function "open" has already in it. My problem is: althought … | |
![]() | Hi, I am trying to store details in a Vector and then recall them using different search categories. I'm getting no errors but the details I enter are either not being stored or not being recalled. I don't know what one it is. I attached the code rather than copy … ![]() |
![]() | Hi, I cannot for the life of me figure out why I keep getting the error message, "cannot find symbol method methodname()" when I try to call methods from another method. I have tried changing the main method so its not static but it makes no difference. Anyone who could … ![]() |
Hi , im trying to create a program that could delete number from an array and resize the array to the correct size . Array[0] = 32 Array[1] = 30 Array[2] = 40 Array[3] = 31 Array[4] = 61 Deleting the number 40 New array Array[0] = 32 Array[1] = … | |
I am designing a 2 player car racing game, and I need to be able to control both cars at the same time from the keyboard (using the arrow keys for one and a,s,d,w for the other) I can get them to work when the other one is not being … | |
Check this code: [code=c] float velocity, acc, time; . . velocity = velocity - acc * time if( velocity == 0.0 ) { // Do something } else { // Do something else } [/code] This code isn't always workng. When the velocity is supposed to be exact 0, it … | |
Hi, I want to create a little Frame class that has two labels built in, the code snippet below is the class. [CODE=python] class DescriptionFrame(Frame): def __init__(self, master, title="", text=""): Frame.__init__(master) self.title = title self.text = text self.titleLabel = Label(self, text=self.title, font=("Times", 12, "underline"), fg="darkred") self.titleLabel.grid(row=0, column=0, sticky=W) self.mainLabel = … | |
Does anyone know of a website that provides a lot of good problem solving exercises, or perhaps a great book for this? I've been reading a couple books on C++ but all of the exercises the books provide are sort of mediocre and don't really train me to actually use … | |
Ok I just started programming again after about 10 years, and i was doing the suggested beginner problems. The first one to create a program that returns the factorial of a number. I think i got it all down right but compiler is saying "expected primary-expression before else" here's the … | |
Goodmorning, Can anyone tell me how to convert a TCHAR to a std::string ?? Thanks.... | |
Here's something that I've wished for a number of times so far: the ability to create a function (taking X) that creates X variables, even if they are all initialized to the same value. For example, [inlinecode]f(3)[/inlinecode] would assign [inlinecode]var1 = 0[/inlinecode], [inlinecode]var2 = 0[/inlinecode], and [inlinecode]var3 = 0[/inlinecode]. My … | |
Hi, In symfony , if i have two modules. module A has functino to get the details and corresponding template has a list of comments to show from filesystem. But comments i want to keep as a seperate module and this asks me to skip from one action to another. … | |
Hi All. I m a C++ programmer and I m trying to understand a piece of code. It fetches the values through command line arguments and makes a decision on the basis of these values. This code is working well but I dont know how? [code] for (int i = … | |
Hello to you all, I am having problems with some code that I am working on for a text parsing system from an external *.txt file. The problem seems to stem from the Tokenize function, as I get a: "LNK2019 error: unresolved external symbol "void __cdecl Tokenize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> … | |
I would like my program to execute some code using random variables. Whether this happens is dependant of three conditions: 1) a variable (first) should be bigger than an other (second) 2) a variable (third) should be equal to an other (fourth) 3) it should check these thing maximum 5 … | |
i'm wrting a basic C program which the user "talks" to the program, you know the sort. well my main menu looks like this: [code] int main() { char name[50]; char mood; printf("hey there, .. whats your name?\n"); gets(name); printf("%s is it? Well how are you today?\n a.Good\n b.Ok\n c.Bad\n", … | |
sorry i'm newbie in here....i have a problem in C++..and this is the first time i did the programming codes, so that is so confusing for me...anyone can help me to solved this problem? [quote]The value e^x can be approximated by the sum 1 + x + x2/2! + x3/3! … | |
Basically I'm trying to take a Template String and store it in a variable for later use. I'm new with Python and programming languages in general so I'm finding difficulty in doing this. This is the code I'm using to generate the string: [code]from string import Template s = Template('$who … | |
[COLOR=#941edf] [/COLOR][COLOR=#941edf]Hello, im new. And I'm kinda stumped. We were given an exercise to do in which the user enters a number in roman numerals and the program converts it to decimal numbers. I have no problem convert if the number given is in the right order from the largest … | |
:eek: hi, Im new here, anyway i'm trying to work out how to get the smallest number from the user's input of four numbers, n1,n2,n3, and n4.. im a novice @ this so i'll copy the section of the program here and you can see whats going wrong with it..i … | |
wtie a program which take as tring and arrange in alphabetic order [code=c] #include<stdio.h> #include<conio.h> #include<iostream.h> void main (void) { clrscr(); char b[7]={98,120,97,113,122,121,101},temp=0; while (!(b[0]<b[1]&&b[1]<b[2]&&b[2]<b[3]&&b[3]<b[4]&&b[4]<b[5]&&b[5]<b[6]&&b[6]<b[7])) { if (b[0]>b[1]) { temp=b[0]; b[0]=b[1]; b[1]=temp; } if (b[1]>b[2]) { temp=b[1]; b[1]=b[2]; b[2]=temp; } if (b[2]>b[3]) { temp=b[2]; b[2]=b[3]; b[3]=temp; } if (b[3]>b[4]) { … | |
require 'action_mailer' ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.server_settings = { :address => "address", :port => 25, :domain => "domain.com", :user_name => "myid@domain.com", :password => "password", :authentication => :login } ActionMailer::Base.perform_deliveries = true ActionMailer::Base.raise_delivery_errors = true ActionMailer::Base.default_charset = "utf-8" i have used the above code to send a mail in /config/enviourment.rb and its … | |
hi Guys this is my problem : a) what should i have to show to Proove that a sort algorithm work well b)what is the order of this algorithm : [code=c] void mySort(int[]A , int n){ int t,i; for (i=1 ; i<=n; i++){ while(A[i] != i){ t = A[i]; A[i] … | |
I'm writing a Java ME app that will access servlets on a tomcat server, (version 5.5) and I'm having a problem. In my client I'm trying to use a HTTP connection to the servlet, like so: [code] if (command == select && currentForm == login) { HttpConnection connection = null; … | |
can anybody tell me how to define multi demensional array in ruby on rails. thanx buddies for previous replies and for this in advance. | |
program to create two threads ,by using them sort two files using merge sort by using one more thread merge them | |
I'm somewhat new to Python and want to clear a few things up regarding running scripts. Alright, so here's what I want to do: I want to run a script inside of a script, and then have the first "parent" script continue running normally. I have tried using both execfile() … | |
Hi, Im having trouble with the piece of code below, i want to have the image change every time you press the button. This code is from a larger project but this is the bit that i cant get to work. Any ideas? [code=python]import Tkinter import random import Image, ImageTk … | |
Hi, I have been looking all over google for a freaking tutorial on code caving. The problem however, 1,000 results shown are crap (I'm sure everyone's shared the same experience). Anyone know of a published tutorial on the concept? Thanks. | |
i have the following problem:: i have ofstream object (i call it fout) belonging to a class{it a field of that class}, where should i initialize it... i write the following test-code but it gives me strange compile errors{in visual studio05} FoutTest.h [code=c] #pragma once #include <fstream> #include <string> class … | |
i got this prime no. code for analysis. and i hav not been able to understand it completely. [code] #include<iostream.h> #include<conio.h> void main() { int x, y, c = 0; clrscr(); cout<<"\nPrime Numbers upto 100 :\n "; for( x = 2; x < 100; x++ ) { if( x % … | |
hi, i am very new to pointer concepts.how to declare the pointer and how to use it | |
can anyone help me with this? i can get it to run but when i run it, the matrix doesnt execute correctly...i am writing it in "C"..this should be a 4x4 magic square...thanks~ [code=c] #include <stdio.h> #define R 4 #define C 4 void Same(int []); int main() { int array[R][C], … | |
Can anyone help me with this code? Most of it was written by me for homework. The switch portion was written by my instructor, and it is just pain confusing to me! I beleive I can write a TTT program from scratch (Won't be accepted) easier than cobbling this together. … | |
I need a function that will populate a multidimensional array with a fixed amount of elements. So that only some of the locations contain a distinguishing number for identification. | |
This is a modified program from the word count program that I posted about. I am trying to calculate the average word length in a sentence. Here is my code so far: [code] def main(): print "This program will calculate the average word length in a sentence" print s = … | |
Hi to everyone... I am to write a code about finding the least coins number to make up an amount that is given by user. It is a trivial question for a programmer and I did code well. In Canada, there are 2 more currencies, Loonie = 1$ and Twonie … | |
First off please excuse me if i do not approach this correctly. This is the first time I have used this site for any help. I am working on my midterm project due no later than sunday at midnight and i am stuck along with other students at the same … | |
Hi I've kinda hit an inspiration drought... Can anyone confirm that it is possible to return the value of several records within a linked list, add all the different values from each record, pass them as some sort of combined parameter into another file or record and be printed from … | |
Hi all, I require some help using ifstream. I want to open a file who's name is made up in part by a user enter string - this is the format of the filename ... [code] "Airports_" << airlineICAO << ".txt" [/code] i did try the following ... [code] ifstream … | |
Hi, I'm a newbie to C++. I use Windows XP Home Edition and VC++ .NET 2003. I have just recently started creating large scale C++ projects with more than one file. I've been having troubles linking the files together. I solved the problem by adding "/FORCE:MULTIPLE" to the command line, … | |
I have for instance this function I wrote and want to assure that the argument is a number when I call the function. [code]def hypotenuse(n): "return the length of the hypotenuse of an isosceles triangle" return (n*n + n*n)**0.5 sides = 3.7 print hypotenuse(sides) [/code]Any ideas how to do this? | |
For my programming class, I have gotten to the lesson that involves overloading constructors and what not, but I have a problem with mine that I am possitive is a very simple syntax error or something. If anyone could be so kind as to take a look at the following … | |
I've been trying to figure what I'm doing wrong all day. I'm becoming discouraged. Can anyone help me out? [code=cplusplus] void stripSpace(string &str) { int i,j,len=str.length(); for (i=0;j=0;i<len;i++;j++) if (str[j]==' ') { str.erase(j,1); j--; } str[j]='\0'; } [/code] I just won't seem to stop until I get this fixed!!!! Any … | |
How do I change the value of a bookmark in Word 97 from VB | |
I don't seem to be able to save a number to a data file: [code]a = 123.44 f = open("data1.dat", "w") f.write(a) f.close() [/code] I get this message: [code]Traceback (most recent call last): File "<string>", line 204, in run_nodebug File "C:\Python25\ZLM\int2file.py", line 4, in <module> f.write(a) TypeError: argument 1 must … |
The End.