General C++ Programming - March 2011 (Page 24)

problem in separate files..
 
hi, i have a problem in separate this code into two file thats in infix.h and infix.cpp plz help me.. #include <iostream> #include <string> #include <sta...
[4 replies] Last: This error occurs because you are trying to use a function before you ... (by Moschops)
understanding - warning: deprecated conversion
 
Learning C++ after 25 year hiatus from any programming. Have inserted the following line in my program: char *incomingfile = "historical.txt" Upon bu...
[2 replies] Last: String literals are actually immutable arrays of characters that the c... (by simeonz)
No operator "==" matches these operands
 
I am trying to see if the first part of the string is equal to 0, but the "==" is cause me problems. Any ideas? // Control Unit initialize int count = ...
[4 replies] Last: Well in that case you could use substr. It just doesn't make sense to... (by Disch)
by tieger
compilation
 
hello, Can someone please explain the output of the code below? I would be greatful if someone explain it row by row. Thank you very much. #include <st...
[14 replies] Last: I think I got it. Thanks (by tieger)
make this code simple
 
#include<iostream.h> #include<conio.h> char ch; int top=-1; char st ; char stack ; void exp() { top=-1; } void input() { co...
[no replies]
error: expected primary-expression before ']' token
 
Hello folks, I can't find the problem in my code. It tells : expected primary-expression before ']' token at line 24 thanks for your help ^^ #in...
[1 reply] : couleur(Chiffres ,80); operator is used to retrieve nth element fr... (by hamsterman)
deque and iterators
 
what is the deal? I cannot seem to get the following to compile: deque<(user defined type)*> history; if(!history.empty() ) { for(deque...
[8 replies] Last: crazy, I havent heard of a const_iterator yet. thank you for your help... (by randonacts)
cant print out the name of this array
 
The problem is : Write a program that creates an array of N names each name has 5 exam scores. Output the names with the highest and lowest scores. ...
[no replies]
Select according to probability
 
Hi, I have a vector and there are probability values of each element. I want to select 10 of them according to these probabilities. To visualize; Ar...
[2 replies] Last: Thank you ;) (by airerdem)
polymorphism and comparable operators
 
can you help me out with a quick question? I am confused how we should build comparable operators. if we change the arguments then that is overloading, but if w...
[3 replies] Last: in this case my program shouldnt be comparing things of different type... (by randonacts)
by venot
how to write a program for this ?
 
consider the following sequence of numbers : 1,1,2,3,5,8,13,21,34... given the first two numbers of the sequence , say (f1 and f2 ),N^th number fn,n>=3 of...
[4 replies] Last: @vitinho lolwut? How about an array instead of all those variables? ... (by TechnoCat)
error: expected primary-expression before ']' token
 
Hello folks, I can't find the problem in my code. It tells : expected primary-expression before ']' token at line 24 thanks for your help ^^ #include <f...
[1 reply] : couleur(Chiffres ,80); change to couleur(Chiffres,80); (by aiby)
how to use an external class
 
Hi everybody, a general question about C++ classes. I have written a little simple class OpenCloseApp, and I would like to use it in another file .cpp. I ...
[8 replies] Last: Thank you to both of you, really... Someone knows how to define my cl... (by nathasion)
Factoring Utility Segfaults
 
The first version I made just outputted the list of factors, but then I wanted something that I could just #include to any project and get a list of factors (re...
[no replies]
Cant figure out this infinite loop
 
I am trying to use the selection sort method to sort a 2d array of names. The program runs but seems to be stuck in a loop somewhere. If anyone could help tell ...
[2 replies] Last: Yes, i meant ">". That was a simple mistake. THANKS! (by KAt in ThA hAt)
Change private classes array size..?
 
Is there a way to change a private classes array size? I have a program where I want to add indexes to an array whenever a new object is created. Here's my c...
[5 replies] Last: Thanks a lot for all of your replies!! Disch, thanks for the example. (by kraigballa)
Advice for a problem
 
Hello everybody, my first post here. I have a problem for witch i don't know where to start from. Lets imagine a carpenter, and he have a pile of wooden beams...
[5 replies] Last: What I understand from the above code is that you use randomized algor... (by simeonz)
by imhiya
Help with impletementing dijkstra's Algorithm
 
I have two files; one with places then the distance between them. Example: Moffat Carlisle 65 Doncaster Hull 76 Northampton Birmingham 90 Leicester Lin...
[1 reply] : Given the circumstances, what I would do is to put the data in vector,... (by simeonz)
A problem with WinSock2.h
 
For a long time now, I have followed the suggestion to use std::cin.ignore( std::numeric_limits< std::streamsize >::max(), 'n' ); to keep the console wi...
[2 replies] Last: Ah, thank you. (by rem45acp)
error LNK2019 by myDLL
 
Hi everybody: I have created my first DLL. I have a little test program to check it, but I get that error messages for all references of the functions of my dl...
[2 replies] Last: I am not very competent on the subject, so I am guessing here. You hav... (by simeonz)
March 2011 Pages: 1... 2223242526... 31
  Archived months: [feb2011] [apr2011]

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