Beginners - January 2013 (Page 43)

opening absolute paths on unix
 
I'm sorry for asking about something well documented, but while I should be able to use an absolute path such as: outFile = "~/myfile.txt"; or outFile ...
[2 replies] Last: Excellent. TIL about std::getenv(.). Thank you very much. This wor... (by lind0370)
by kwnan
Is there any biult-in function to convert from hex to chararray
 
I am new user to C++ and would like to know if there is any biult-in function to convert from hex to chararray? Regards
[2 replies] Last: It is not clear what you want. Do you want to convert an integer to a ... (by Peter87)
by chumm
User defined array size?
 
So I want to create an array size depending on what the user specifys. I have tried this in visual studio 2010 and it tells me it has to be a constant value. Ho...
[9 replies] Last: If you have predetermined sizes for your boards, one option (definitel... (by deckeresq)
Function outside of class
 
Hello, I am trying to create functions outside the class they are used in and am getting errors about duplicate creations. is this not how you create functions ...
[8 replies] Last: Regardless of the spat over use of inline , Peter87 is correct - unle... (by MikeyBoy)
if (answer == "word") printf("It's correct");
 
I have a problem. I need to get from user an answer, for example yes or no, but I can't. I did this, but it doesen't work. #include <stdio.h> #include <conio....
[5 replies] Last: Chervil, you deserve a big THX! (by Isengardium)
Subtraction of fractions giving the wrong answer.
 
Hi, I'm making a program for my Chemistry course at uni that does a certain calculation for me. However I've noticed it's returning the wrong answer. I took a c...
[7 replies] Last: You're right Chervil, from this sites documentation: The default typ... (by closed account o3hC5Di1)
Entry number-fstream
 
Hello :) I've made a program that writes at the end of the file base.txt the artist,the name and the genre of a song.I want that every entry should have a numb...
[12 replies] Last: okey,thank you cubbi ,you saved me (by Guzfraba)
by Hotice
friendship in multiple files
 
I followed the advice in this article: http://cplusplus.com/forum/articles/10627/ , before anyone asks. I am, however, getting the following errors in the proje...
[10 replies] Last: I took my suggestion (which was based on yours): I eliminated the para... (by Hotice)
perfect number
 
#include<iostream.h> #include<conio.h> main() { clrscr(); int s=0; for (int i=1; i<=1000; i++) { for (int j=1; j<=i; j++) { if(i%j==0) s=s+j; if(s=...
[3 replies] Last: Fransje he may be using Turbo C++ Yeah, but still it is good practic... (by Fransje)
by Hotice
Constructors
 
Suppose you were defining a string in the default constructor. Now, suppose you wish to append something to that string in the parametric constructor. Does the ...
[6 replies] Last: Even if you did something like: #include <iostream> using namespac... (by Hotice)
by junn
#if defined(SYMANTEC) not skip when i use Dev C++
 
==================================================== void CG_Reset() { #if defined(SYMANTEC) csetmode(C_ECHO, stdin); #endif } =========================...
[2 replies] Last: umm.... i dont know yet :p i'll check wheater it is defined already or... (by junn)
Calculation Program for C++
 
Hello, I am new to C++. I am trying to build a program that solves this the bellow problem. I've started it but I'm no sure if this is right. Please help! ...
[1 reply] : As the assignment says, you should use a for loop to try all possible ... (by Zhuge)
by Shiro
Button callback problem
 
i cant handle button press when the button is child from another window. when i put the button on main window, works fine, i got the clicks on WM_COMMAND (hwnd...
[2 replies] Last: hm, sometimes i got the BUTTON HWND on lParam from MainProc i did it ... (by Shiro)
Need Some Help (With a simple calculator)
 
I've been having trouble with my calculator its my first program.I keep getting an error at the last line of my code and can't find out why.Here is the code ...
[3 replies] Last: Thank you help me a lot. This was my first try at making a bigger code... (by zackemattackem)
please , i have exam in my college about c++
 
i have exam in my college in c++ and the problem that exam in english language and i am from egypt so i am not perfect in english i can solve ,but main pr...
[19 replies] Last: @amara waseem default appears at the end of all case..it is execut... (by vlad from moscow)
One or more multiply defined symbols found
 
I get this error when I #include my bitmap class in multiple .cpp files. How can I include it in more than one class without getting this error?
[18 replies] Last: That seems to have fixed it. Thanks for all your help. :) (by FlyingMonkey456)
Need help with simple code!
 
Hello! First week learning c++ and one of the "try this" problems was to convert currencies." It works up until you enter the currency you want to convert to. T...
[6 replies] Last: start_type_money is string. Try changing this to a float. Also, you ne... (by closed account LN7oGNh0)
Why bother with memcpy?
 
Why use memcpy instead of type-specific copy functions, e.g. strncpy? #include <stdio.h> #include <string.h> struct { char name ; int age; } person,...
[10 replies] Last: Damn, I should have seen that. Of course! (by divine fallacy)
Determine if they could represent side of a triangle.
 
Give me logic to determine if the 3 sides represent a side of a triangle.
[2 replies] Last: thnks fun2code, I just found on internet. It is a series of three ine... (by dipen45)
Undefined reference to...
 
Hello, I was trying to make a simple queue by using classes. Problem is, I can't seem to get it working. When I compile it into a .o file, it all works, but w...
[5 replies] Last: The problem is that you did not allocate an object of type Queue. Aft... (by vlad from moscow)
January 2013 Pages: 1... 4142434445... 52
  Archived months: [dec2012] [feb2013]

This is an archived page. To post a new message, go to the current page.