51,593 Topics

Member Avatar for
Member Avatar for aclark17

Ive been having some trouble getting my Nqueens program to run for n>=9. I use a function bool PlaceQueens(c) to recursivley find all solutions using a backtracking algorithim , it seems to return neither true or false. For n=9, the function PlaceQueens exits without returning a value during call 4296. …

0
65
Member Avatar for zourlas

Hi mates well i have a problem i used fstream in console mode in a class function and worked fine the txt file was created and tha data were written normally when i copied this class in the cpp file in vcl enviromen and made some changes and gave the …

0
67
Member Avatar for Kob0724

I can not understand why I am getting this memory leak. First, here is the ouput from valgrind. [code] ==27078== 24 bytes in 1 blocks are definitely lost in loss record 45 of 827 ==27078== at 0x4A061A5: operator new(unsigned long) (vg_replace_malloc.c:167) ==27078== by 0x434B8F: ETArray::ETArray(QString const&, QWidget*) (etutils.cpp:343) ==27078== by …

Member Avatar for Ancient Dragon
0
192
Member Avatar for hjast

how I connect a c# controller on a server and an asp.net form based website (it has to go though the c# controlelr to get the data, not just in database)

Member Avatar for serkan sendur
0
52
Member Avatar for Alex Edwards

I'm getting a really odd error in my program. The lvl value retains its initial value if it's left alone, but when the program runs after you've assigned it a value it get's a ridiculous number... then the previous number after another assignment... and the process continues. Here's the code. …

0
98
Member Avatar for remk

Hi, I have the following C++ code [code] #include <string> #include <iostream> //maybe std::string using namespace std; int main() { size_t r = 134480; size_t c = 268960; size_t **opt; opt = (size_t **)malloc(r * sizeof(size_t *)); if(opt != NULL) { opt[0] = (size_t *)malloc(r * c * sizeof(size_t)); if(opt[0] …

Member Avatar for tesuji
0
114
Member Avatar for joelbaby

Hi, I have dates/times in UTC, and need to convert them to New York time. My pc is not based in new york, so I cannot use the local time. So far I have found: BOOL WINAPI SystemTimeToTzSpecificLocalTime( __in LPTIME_ZONE_INFORMATION lpTimeZone, __in LPSYSTEMTIME lpUniversalTime, __out LPSYSTEMTIME lpLocalTime ); lpTimeZone: A …

Member Avatar for tesuji
0
102
Member Avatar for kux

I understand that visual studio has a nmake tool for building a project from a makefile. What I want to do is to be able to build my project outside the Visual Studio IDE, from command line using nmake. I found some tutorials about writing a windows makefile for nmake, …

Member Avatar for Prabakar
0
404
Member Avatar for Malakai

Hi Folks If one of you gurus out there can resolve this issue, I promise to have your babies. I am lost right now. So here is the problem: The std::map in VC98 seems to be playing up. Below is the test code used to verify my Sql class: I …

Member Avatar for Ancient Dragon
0
81
Member Avatar for tusharvichare

Hi, I want to create XML in VC++ please if any one have solution for that then please forward me. I want to create XML as per below, <STUDENT> <ID>S202<ID> <NAME>TUSHAR<NAME> <PHONENO>96874525<PHONENO> </STUDENT> please any one have code please forward me Thank you.

Member Avatar for tesuji
0
100
Member Avatar for joshmo

I am trying to do a simple queue using linked list. I am failing to perform dequeue because I cant get the logic straight. If there is anyone who could explain to me about the simple logic of this then it would help alot. Thanks. I have also posted the …

Member Avatar for Lerner
0
156
Member Avatar for Yuichi

Hi guys,i am new to both c++ and this forum...I got a problem with a question i m supposed to do.I am supposed to create a queue system but i am stuck at a point where i can't add numbers to the queue system.This is the question... You have been …

Member Avatar for Yuichi
0
208
Member Avatar for elduquex26x

Hello, I was curious if anyone knew any Rule Engines availble for a C++ application? I've found a number of Java based Rule Engines and a couple for .NET managed code however these aren't options for my current purpose. I'm looking to have a 'rules' file that holds all of …

0
67
Member Avatar for ff4930

Hello everyone, I have this project where I have to convert a declaration into English word. If it reads this line(assume no spaces are used) void*(*z) (char, int (*)()); my output would be. z is a pointer to a function that takes 2 parameters a char and a pointer to …

Member Avatar for Radical Edward
0
141
Member Avatar for Alex Edwards

I hear this argument a LOT and hear that templates/generics are far more superior in code production than virtually-driven classes. I still don't understand this. I've heard the virtual functions cause problems for performance and that the solution is always to use Templates/Generics. Do they mean that it is better …

Member Avatar for Radical Edward
0
1K
Member Avatar for asif.ishaq

Hi all, I'm working on a financial application.It is a cross platform application.I need date and time for logging purposes.Please help me out in this matter.I know about "SYSTEMTIME" but that works only for windows.Waiting for positive replies. Thanks, Asif

Member Avatar for Ancient Dragon
0
248
Member Avatar for Metalsiege

I recently completed a program and want to break up the classes into header files and cpp files. I've got the declarations in the header files, but I can't get it to build if I try to move the implementation of the classes to separate cpp files. I know you …

Member Avatar for Ancient Dragon
0
108
Member Avatar for camproject

I am using vc++ dialog based application.I have two dialogs.in the second dialog i have an editbox to give a camera ip.what i want is when i give the ip in the edit box in second dialog,the vlc control in first dialog should play it..any code..

Member Avatar for Ancient Dragon
0
68
Member Avatar for phalaris_trip

[b]This is a long post with no specific questions as such. I'm just looking for any advice from people with real-life experience in the software development arena.[/b] ---------- Intro: I've just taken up a summer job, and I was really enthusiastic about this. It will be 12 weeks of C++, …

Member Avatar for TacklesMcCaw
0
395
Member Avatar for ar31an

[quote] 1 4 15 7 8 10 2 11 14 3 6 13 12 9 5 ☺ As you can see there is a ☺ at bottom right corner. Implement the program so that a box like the above one is displayed (lines may not be displayed). Allow the user …

Member Avatar for ar31an
0
142
Member Avatar for delixir

this is the working 3x3 sudoku but i still need to do 6x6 and 9x9. i need help please and suggestions. <replaced code with attachment>

Member Avatar for DigitalPackrat
-1
300
Member Avatar for USUAggie

When I test my stack with an int when I do pop all it seems to return is the address of the thing that I want and not the value, which makes sense since I return something by reference.. but I just cant seem to figure out what to do …

Member Avatar for Alex Edwards
0
143
Member Avatar for cecyl

Hello All, Please, advice some as quick as posible algorithm to sort file containing about 500 000 integers. Roughly 30% of them have value 1, 20% are 2, 10% 3......0,1% are 1 000 Thanks much, C

Member Avatar for vijayan121
0
128
Member Avatar for Alex_

My problem is that i can not understand what do they mean by "The application of mathematical algorithms analisys for solving the 'perl calculus' problem". the perl calculus problem sounds like this: we have 3 ordinary perls(1,2,3), and 3 magic perls(A,B,C). Each magic perl can transform itself in the following …

Member Avatar for Alex Edwards
0
114
Member Avatar for Kadence

The vector class provides access and altering uses brackets, e.g. v[5]. How can I make a class that can do the same? e.g. given Class Test object t, t[5]=...

Member Avatar for Kadence
0
92
Member Avatar for QuantNeeds

Help – for both of my for header components, error reads the following, but I do not understand how to fix this because I am not sure what is wrong about it. Please help. warning C4552: '>' : operator has no effect; expected operator with side-effect [code] void inputGrades (int …

Member Avatar for QuantNeeds
0
796
Member Avatar for QuantNeeds

Help - why is there an issue with the power function? the error states: : error C2668: 'pow' : ambiguous call to overloaded function [code] void compute(int integer) { cout << integer; int value = 9; while(value > 0) { cout << ++ integer; int square = pow(integer,2); cout << …

Member Avatar for QuantNeeds
0
636
Member Avatar for Alex Edwards

I don't understand... I thought that it would be functional based on the logic, and I was fairly careful with my syntax but it's still not working. Sometimes values will compare to as being "equal" even though they're not. I'm using troolean compareTo method (an int, returns -1, 0 or …

Member Avatar for Alex Edwards
0
116
Member Avatar for daviddoria

I am trying to overload * [code] class Vector3 { public: geom_Vector3 operator * (double d);//overload * from the left }; geom_Vector3 operator * (double d, geom_Vector3 &V); //overload * from the right [/code] The problem is this works [code] geom_Vector3 V(1,2,3); cout << -1 * V << endl; [/code] …

Member Avatar for Radical Edward
0
108
Member Avatar for Alex Edwards

I was working with my own "Vector"-like class and thought about something. If I use the [] operator and return a reference, is there any way to mark that indice when a value is assigned to it? For example.. if I want to make a trim function that removes the …

Member Avatar for Radical Edward
0
215
Member Avatar for Traicey

What usually be the cuase of the file reading the wrong data, lets say I have a file and I wana read a date which is the 1st data in the file but instead is reading something else My file is more like the following but instead of reading the …

Member Avatar for Ancient Dragon
0
127
Member Avatar for comply or die

Hello people, I know how simple binary search works, but how can I do a double binary search, we got students each with a name and a code, I need in my binary search to find a student by name AND by code, using ONLY binary search.How could I do …

Member Avatar for Ancient Dragon
0
123
Member Avatar for ravysters

hi.. i am using postgresql as my database and i have to connect to this database using C++ or C or C#... can anyone help me with the code to connect to this database and read values from a table..

Member Avatar for Nick Evan
0
54
Member Avatar for rahiakil

I need some feedback on the C puzzles site here [url]http://concentratedlemonjuice.blogspot.com/2008/06/c-and-c-compilations-questions-puzzles.html[/url]

Member Avatar for Nick Evan
0
94
Member Avatar for mikelle

I'm not sure how to approach this problem.. mostly with the while statement.. Download the original attachment The Problem: Write a program on timber regrowth of a harvested forest. The user is to enter the total number of acres in the harvested area, the number of acres which were left …

Member Avatar for Nick Evan
0
270
Member Avatar for sam1

hi, I have been used to vb. now I am trying to do c# winforms. in visual basic usually when coding you get a drop down menu at the top which lists all your components and method names. is this possible to get with c# winforms as it would make …

Member Avatar for Shaunak.Soni
0
67
Member Avatar for mikelle
Member Avatar for camthalion95
0
46
Member Avatar for Tim UK
Member Avatar for mikelle

I'm not sure how to approach this problem.. mostly with the while statement.. Download the original attachment The Problem: Write a program on timber regrowth of a harvested forest. The user is to enter the total number of acres in the harvested area, the number of acres which were left …

Member Avatar for Salem
0
116
Member Avatar for kurt2

How do I make a floating point arithmetic more precise? Let me show the code first, it probably can explain my question faster than in words. [CODE] int main() { double n = 0.0; while (n < 2.5e-9) { // perform some operation n += 5.0e-9; } } [/CODE] Looking …

Member Avatar for kurt2
0
160
Member Avatar for amygoel
Member Avatar for TacklesMcCaw

Well to start let me say that I'm only a newbie, as my status says, but after a year of C++ I have what I consider a pretty good grasp over the basics of the language. I'm still at school for the summer doing an internship and have a lot …

Member Avatar for TacklesMcCaw
0
155
Member Avatar for ar31an

1 4 15 7 8 10 2 11 14 3 6 13 12 9 5 ☺ As you can see there is a ☺ at bottom right corner. After implementing the program the above box will display (lines may not be displayed). Allow the user to hit any of the …

Member Avatar for William Hemsworth
0
208
Member Avatar for Alex Edwards

I don't understand what is happening to my program... I have a feeling that private members are marked private for a reason, because I'm having a serious error with accessing base-class data types via inheritance and declaring friends within classes... If you run the test program after attaching the header …

Member Avatar for Alex Edwards
0
163
Member Avatar for Alex Edwards

Right now I feel fairly unlearned with dynamically allocating memory... even after doing so several times and doing projects that require one to dynamically allocate memory for classes and primitive types. Basically, how does one research allocation for different scenarios such as... [code=c++] #include <cstdlib> #include <iostream> using namespace std; …

Member Avatar for Alex Edwards
0
75
Member Avatar for kux

I have a project that builds in a static library, using visual studio 2005 When I build it in debug mode it all goes fine, but when I build it in release i get the following error: Error 2 error C3861: '_SCL_SECURE_VALIData': identifier not found in file xtree I disabled …

0
81
Member Avatar for comply or die

Hi I'm pretty new to programming started about 3 months ago, and even though I feel I'm getting better, I still find it not easy at all, I got especially trouble with that code, look I want to put into an array of strings sentences with spaces, etc. At last …

Member Avatar for comply or die
0
172
Member Avatar for cybx

I don't no which way to go, get Emu8086 to link to Visual C++ or Visual C++ to Emu8086, I mean I just don't know how to link it, I think Visual C++ links easily to MASM, yet I need Visual C++ to compile to assembly and then Emu8086 to …

Member Avatar for cybx
0
107
Member Avatar for sniper29

[CODE] double indexLowTemp() {ind=1; for (a=0;a<col;a++) {if (low<=temp[a][0]) {low=temp[a][0]; ind=a; } } [/CODE]

Member Avatar for mitrmkar
0
49
Member Avatar for radnik

Hey guys i need some help. I have a txt file which looks like this: 234 56 123 34 456 56 7 45..... 123 3 34 56 56 67 67 2..... . . . Where each line represents a series of points in coordinate system, and the first number in …

Member Avatar for Tigran
0
97

The End.